[Bug c++/117317] An internal compiler error on call to virtual constexpr function via comparison operator in CRTP with multiple inheritance

2024-10-27 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117317 --- Comment #1 from Amir Kirsh --- A more simple example, same internal compiler error: class Base { public: constexpr bool operator==(const Base& b) const { return getIdentity() == b.getIdentity(); } private: constexpr virt

[Bug c++/117317] New: An internal compiler error on call to virtual constexpr function via comparison operator in CRTP with multiple inheritance

2024-10-27 Thread kirshamir at gmail dot com via Gcc-bugs
Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- The following code results with internal compiler error

[Bug c++/106094] New: Lifetime extension of temporary do not obey some rules of [class.temporary]

2022-06-26 Thread kirshamir at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- The simple cases of lifetime extension are working. But all below do not obey the rules. Lifetime should have been

[Bug c++/104850] Instantiating a destructor for a template class too early, before the calling destructor is seen - rejects valid code

2022-03-09 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104850 --- Comment #2 from Amir Kirsh --- // adding the required include to the example #include // for nullptr_t template struct uptr { uptr(nullptr_t) {} ~uptr() { delete (new T); } }; class A { public: A(); ~A(); private:

[Bug c++/104850] New: Instantiating a destructor for a template class too early, before the calling destructor is seen - rejects valid code

2022-03-08 Thread kirshamir at gmail dot com via Gcc-bugs
Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- The following code is rejected as trying to use incomplete

[Bug c++/67969] [concepts] bug with overloaded function when using constraints

2022-01-31 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67969 Amir Kirsh changed: What|Removed |Added CC||kirshamir at gmail dot com --- Comment #4

[Bug libstdc++/100992] Wrong result for is_constructible for const ref of tuple of tuples

2021-06-09 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100992 --- Comment #2 from Amir Kirsh --- Maybe a dup of: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96592

[Bug c++/100992] New: Wrong result for is_constructible for const ref of tuple of tuples

2021-06-09 Thread kirshamir at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com CC: kirshamir at gmail dot com Target Milestone: --- The second static_assert below fails, should pass: #include struct F { F

[Bug c++/100838] -fno-elide-constructors for C++14 missing required destructor call

2021-05-30 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100838 --- Comment #1 from Amir Kirsh --- This main: int main() { MyString s1 = MyString{"Hello"}; // same also for rounded brackets std::cout << __LINE__ << std::endl; } works as expected. Output with C++14 and -fno-elide-constructors: ctor c

[Bug c++/100838] New: -fno-elide-constructors for C++14 missing required destructor call

2021-05-30 Thread kirshamir at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- Code: https://godbolt.org/z/jKnKTds7s #include class MyString { public: MyString(const char* s = "") { std::cou

[Bug c++/99158] New: [Enhancement] Better error message when missing #include and using placement new

2021-02-19 Thread kirshamir at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- Use of placement new requires #include Without this include the error message is something like: error: no matching

[Bug c++/97402] Value of dependent partial-concept-id is not usable in a constant expression

2021-01-10 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97402 --- Comment #3 from Amir Kirsh --- Playing with the code even leads to compiler seg-fault, see: https://stackoverflow.com/a/65654043/2085626

[Bug c++/97402] Value of dependent partial-concept-id is not usable in a constant expression

2021-01-10 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97402 Amir Kirsh changed: What|Removed |Added CC||kirshamir at gmail dot com --- Comment #2

[Bug c++/97288] Assignment sequence before order - evaluating reference to value of right side not in order

2020-10-04 Thread kirshamir at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97288 --- Comment #1 from Amir Kirsh --- For user defined type this behavior might be ok, as the order of evaluation of parameters is not defined, however this behavior is reflected also for primitive types: int main() { int a {5}; (a += 1) +=

[Bug c++/97288] New: Assignment sequence before order - evaluating reference to value of right side not in order

2020-10-04 Thread kirshamir at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- Following code results with different result in gcc and clang, seems that gcc get wrong the sequence before

[Bug c++/97010] New: C++20 ADL and function templates that are not visible (P0846R0) fails on call with templated type

2020-09-10 Thread kirshamir at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- #include #include template void print(const Tuple& tup) { // P0846R0: ADL should work

[Bug c++/96936] New: brace initialization of const char* from string literal in specific cases doesn't compile

2020-09-04 Thread kirshamir at gmail dot com
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- template auto convert(U&& t) { // fails - see link to compiler explorer: return T{s

[Bug c++/96106] New: A friend abbreviated template function denies access to private members

2020-07-07 Thread kirshamir at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- template class number { T num; public: number(T num = 0): num(num) {} friend auto add(auto a, auto b); }; auto add