[Bug target/113149] Function multiversioning prefers arch=x86-64-v3 to actual processors

2023-12-26 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113149 --- Comment #1 from Ed Catmur --- >From b4ca8bf55100eddeaa14a52f1bc8e73fac565d83 Mon Sep 17 00:00:00 2001 From: Ed Catmur Date: Tue, 26 Dec 2023 11:46:26 -0600 Subject: [PATCH] Swap P_PROC_AVX2 with P_X86_64_V3, etc. https://gcc.gnu.org/bugzil

[Bug target/113149] New: Function multiversioning prefers arch=x86-64-v3 to actual processors

2023-12-26 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since #101696, we can write __attribute__ ((target ("arch=x86-64-v3"))) char const* f() { return "x86-64-v3";

[Bug c++/112354] New: mismatched types 'B' and 'B&' for generic lambda noexcept-specifier referencing enclosing function parameter

2023-11-02 Thread ed at catmur dot uk via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 4.9.0, template struct B { B(); B(B con

[Bug c++/112341] New: error: insufficient contextual information to determine type on co_await result in function template

2023-11-01 Thread ed at catmur dot uk via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include struct A { int j; }; struct B { bool await_ready(); bool await_suspend(std

[Bug c++/111944] Spurious '' is used uninitialized in Boost.Variant2 (-Wuninitialized -Og)

2023-10-23 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111944 --- Comment #1 from Ed Catmur --- Correction, it does affect sanitizers (-O2 -fsanitize=address) as well as -Og.

[Bug c++/111944] New: Spurious '' is used uninitialized in Boost.Variant2 (-Wuninitialized -Og)

2023-10-23 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12.1, with Boost 1.71 or later, #include int main() { boost::variant2::variant r; r.emplace(); } In membe

[Bug c++/111840] New: =delete("can have a reason")?

2023-10-16 Thread ed at catmur dot uk via Gcc-bugs
mponent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 6.1, gcc accepts the following (without warnings at any level): int f() = delete("should have a reason"); Much as I'd love to be able to write this, gcc seems to be

[Bug c++/111602] [11/12/13/14 Regression] "Error: symbol is already defined" for variable template dependent on default argument lambda of class dependent on local type used in sfinae and non-sfinae c

2023-09-26 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111602 --- Comment #2 from Ed Catmur --- (In reply to Andrew Pinski from comment #1) > The local type of f() is not needed. Thanks! I was confused since the local type is required in this similar example: template struct P { static constexpr bool

[Bug c++/111602] New: "Error: symbol is already defined" for variable template dependent on default argument lambda used in sfinae and non-sfinae

2023-09-26 Thread ed at catmur dot uk via Gcc-bugs
oduct: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since gcc 8.1, template constexpr bool V = true

[Bug tree-optimization/111094] Spurious Wuninitialized swapping underlying bytes of object representation in move constructor

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111094 Ed Catmur changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 111094, which changed state. Bug 111094 Summary: Spurious Wuninitialized swapping underlying bytes of object representation in move constructor https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111094 What|Remo

[Bug c++/111094] New: Spurious Wuninitialized swapping underlying bytes of object representation in move constructor

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- struct S { short x, y; }; struct A { A() {} A(A&& rhs) { auto p = reinterpret

[Bug tree-optimization/111090] Bogus -Wuninitialized for trivial copy of nested struct with partially initialized array

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111090 Ed Catmur changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 111090, which changed state. Bug 111090 Summary: Bogus -Wuninitialized for trivial copy of nested struct with partially initialized array https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111090 What|Removed

[Bug c++/111090] Bogus -Wuninitialized for trivial copy of nested struct with partially initialized array

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111090 --- Comment #1 from Ed Catmur --- uh, -O -Wall is necessary, obviously. https://godbolt.org/z/eT9dY467P

[Bug c++/111090] New: Bogus -Wuninitialized for trivial copy of nested struct with partially initialized array

2023-08-21 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- struct A { A() { buf[0] = 0; } int buf[2]; }; struct B { A a; }; struct C { C(B const& b) : b(b) {}

[Bug c++/111016] New: Confusing "used in its own initializer" for non-dependent ad-hoc constraint

2023-08-14 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include struct S { int i; }; static_assert(requires(S s) { requires std::destructible; }); In file included from :1:

[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))

2023-08-10 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #58 from Ed Catmur --- (In reply to Roman Krotov from comment #57) > But I don't see any reasons not to implement the switch right now... Making [[gnu::warn_unused_result]] mean the same as [[nodiscard]] would be a reduction in expres

[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))

2023-08-09 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #55 from Ed Catmur --- (In reply to Roman Krotov from comment #54) [[nodiscard]] is in C23, so we can expect that attribute to be adopted where people intend that behavior (warning suppressible by cast to void) as opposed to the nonpo

[Bug sanitizer/110835] [13/14 Regression] -fsanitize=address causes huge runtime slowdown from std::rethrow_exception not called

2023-07-28 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110835 --- Comment #6 from Ed Catmur --- Thanks, filed https://github.com/llvm/llvm-project/issues/64190 .

[Bug c++/110835] -fsanitize=address causes slowdown from std::rethrow_exception not called

2023-07-27 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110835 --- Comment #1 from Ed Catmur --- Motivation is https://github.com/boostorg/exception/blob/b039b4ea18ef752d0c1684b3f715ce493b778060/include/boost/exception/detail/exception_ptr.hpp#L550 ; the half-reduced code is: #include struct S {}; int mai

[Bug c++/110835] New: -fsanitize=address causes slowdown from std::rethrow_exception not called

2023-07-27 Thread ed at catmur dot uk via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include std::exception_ptr p; void f() { try { throw 1; } catch(char) { std::rethrow_exception(p); } } int main() { for (int i

[Bug c++/110809] ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs

2023-07-25 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110809 --- Comment #5 from Ed Catmur --- The original code is valid. A reduced valid case would be: ``` template struct S {}; template struct bucket {}; template int find_indices_impl(bucket const &); struct HashTable : bucket, 1>, bucket, 2> {}; au

[Bug c++/110809] New: ICE: in unify, at cp/pt.cc:25226 with floating-point NTTPs

2023-07-25 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include using A = double; template struct S {}; auto x = boost::hana::make_map( boost::hana::make_pair(boost::hana::type_c>, 1), bo

[Bug c++/110493] 'is not a constant expression' for function-local static std::initializer_list with fsanitize=undefined

2023-06-30 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110493 --- Comment #4 from Ed Catmur --- Ah, thanks. So a workaround is something like: void f() { static auto a = {((bool*)&(int const&)0, std::string())}; } That's not too bad, then.

[Bug libstdc++/110493] New: 'is not a constant expression' for function-local static std::initializer_list with fsanitize=undefined

2023-06-29 Thread ed at catmur dot uk via Gcc-bugs
on: 12.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12.3.0, under -fsanitize=undefined -std=c++20: #include

[Bug libstdc++/109976] New: error: is not a constant expression in std::equal() with _GLIBCXX_DEBUG

2023-05-25 Thread ed at catmur dot uk via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #define _GLIBCXX_DEBUG #include #include constexpr bool f(std::string const& l, std::string const& r) { return st

[Bug c++/109975] New: error: '(((int*)(&.X::a)) != 0)' is not a constant expression

2023-05-25 Thread ed at catmur dot uk via Gcc-bugs
verity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- struct X { int a[1]; }; constexpr bool b = (X{}.a != 0); :7:27: error: '(((int*)(&.X::a)) != 0)' is not a constant

[Bug c++/109958] [10/11/12/13/14 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration

2023-05-25 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958 --- Comment #3 from Ed Catmur --- B::f is a static member function so yes, it's valid. A class member access expression naming a static member function is an lvalue designating that function, and it shouldn't make any difference that the functio

[Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration

2023-05-24 Thread ed at catmur dot uk via Gcc-bugs
Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- struct B { static int f(); }; struct D : B

[Bug preprocessor/109912] New: #pragma GCC diagnostic ignored "-Wall" is ignored

2023-05-19 Thread ed at catmur dot uk via Gcc-bugs
iority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #pragma GCC diagnostic warning "-Wall" #pragma GCC diagnostic ignored "-Wall" int i = 0 | 1 & 2; warning: suggest parenthes

[Bug libstdc++/109882] New: -fsanitize=thread #include transitively includes sanitizer/common_interface_defs.h

2023-05-16 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12.3.0, when compiled under tsan (-fsanitize=thread), #include transitively includes sanitizer

[Bug c++/109870] New: Miscomputation of return type of unevaluated lambda in type alias in template context

2023-05-15 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template struct X {}; template struct M { using R = decltype([] { return 1; }()); template struct S { X p; }; }; M

[Bug sanitizer/83780] False positive alignment error with -fsanitize=undefined with virtual base

2023-05-01 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83780 --- Comment #4 from Ed Catmur --- Clang has fixed this in https://github.com/llvm/llvm-project/commit/4ddf140c00408ecee9d20f4470e69e0f696d8f8a (12.0.0-rc1).

[Bug c++/109677] New: Access control bypass for function template default argument brace initialization of private default constructor

2023-04-28 Thread ed at catmur dot uk via Gcc-bugs
: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- gcc accepts-invalid: struct B { private: B(); }; template int f(T

[Bug c++/109640] Spurious Wdangling-reference for argument to temporary lambda cast to rvalue reference

2023-04-26 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109640 --- Comment #2 from Ed Catmur --- Ah, so this is Bug 108165? That's a shame, we use (temporary) lambdas extensively so I think we'd have to disable the warning entirely.

[Bug c++/109640] New: Spurious Wdangling-reference for argument to temporary lambda cast to rvalue reference

2023-04-26 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- bool b() { int a; int&& i = [](int& r) -> int&& { return static_cast(r); }(a); a

[Bug c++/109070] New: ICE in class template member function overloads distinguished by non-functionally-equivalent constraints and return type

2023-03-08 Thread ed at catmur dot uk via Gcc-bugs
Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template concept C = true; template struct A { int f() requires

[Bug c++/79682] [concepts] ambiguous overload with functionally equivalent predicate constraints compiles

2023-03-08 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79682 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #2 from Ed

[Bug c++/70536] g++ doesn't emit DW_AT_name for DW_TAG_GNU_formal_parameter_pack

2023-02-04 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70536 --- Comment #6 from Ed Catmur --- Resubmitted: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611366.html Hopefully this time I'll remember to save the email for pinging.

[Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode

2023-01-19 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 11.1, the following ices in -std=c++20 and later: template struct C { template static constexpr int x = 1; }; template template int C

[Bug c++/70536] g++ doesn't emit DW_AT_name for DW_TAG_GNU_formal_parameter_pack

2023-01-13 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70536 --- Comment #5 from Ed Catmur --- PR: https://github.com/ecatmur/gcc/pull/5

[Bug c++/108390] New: ICE in fold_convert_loc, at fold-const.cc:2504 partial ordering between array types

2023-01-12 Thread ed at catmur dot uk via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template long f(int(*)[t], T(*)[t]); template int f(int(*)[i], T(*)[i]); int n = f(0, 0); :4:18: internal compiler error

[Bug c++/107206] New: Bogus -Wuninitialized in std::optional

2022-10-10 Thread ed at catmur dot uk via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12, at -std=c++17 -O -Wuninitialized: #include struct X { X() = default; X(X const& r) : i(r.i) {} int i; }; struct Y { Y() : x() {} X x; std::option

[Bug c++/106712] Incorrect propagation of C++11 attributes to subsequent function declarations

2022-08-22 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106712 --- Comment #1 from Ed Catmur --- I believe this is happening because start_decl can modify prefix_attributes (by first chaining it onto attributes, then passing the merged chain to grokdeclarator which can then chain onto that merged chain).

[Bug c++/106712] New: Incorrect propagation of C++11 attributes to subsequent function declarations

2022-08-22 Thread ed at catmur dot uk via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- In [[first-attribute]] int f [[second-attribute]](), g(); the [[first-attribute]] should apply to both f and g, the [[second

[Bug c++/106411] New: Wdangling-pointer for a class that cleans up on destruction

2022-07-22 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Reduced testcase: #include void g(auto f1) { auto f2 = std::move(f1); } struct F; struct E { F* f = nullptr; }; struct F { E* e

[Bug c++/106074] Spurious Wstringop-overflow for int-to-string with SSE4

2022-07-07 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106074 --- Comment #1 from Ed Catmur --- Another example, using Date 3.0.1: #include void f(std::istream s) { std::chrono::system_clock::time_point tp; date::from_stream(s, "%Y", tp); } https://godbolt.org/z/fscqTd947 In file included from

[Bug c++/106185] New: Spurious Wstringop-overflow in std::vector::resize

2022-07-04 Thread ed at catmur dot uk via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12.1.0: At -O3 -std=c++20 -Werror=stringop-overflow: #include void f() { std::vector v; v.resize(26); v.resize(33); v.resize(39); v.resize(47

[Bug middle-end/103993] -Wismatched-new-delete due to difference in inlining decisions

2022-06-29 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103993 --- Comment #4 from Ed Catmur --- And another example, provoked by throwing new (this only happens at -Og): #include struct D { D(); static void* operator new (std::size_t s) { if (void* p = ::malloc(s)) return p;

[Bug c++/106074] New: Spurious Wstringop-overflow for int-to-string with SSE4

2022-06-24 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Code adapted from https://github.com/capnproto/capnproto/blob/be7a80b4add706ddaeb41689221146b86c3e0f5f/c%2B%2B/src/kj/string.c%2B%2B#L157-L203 : auto f

[Bug c++/105918] New: Spurious Warray-bounds in std::to_chars

2022-06-10 Thread ed at catmur dot uk via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include template std::to_chars_result toChars(char (& buf)[N], int number) { char temp[N]; std::to_chars_result result = std::to_chars(temp, temp + N, number);

[Bug c/105585] [12/13 Regression] Spurious stringop-overflow warning with

2022-05-12 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585 --- Comment #2 from Ed Catmur --- Affected code: https://github.com/abseil/abseil-cpp/issues/1175 The proposed patch to abseil-cpp corresponds to adding an assumption that `b` is true above.

[Bug c/105585] [12/13 Regression] Spurious stringop-overflow warning with

2022-05-12 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585 --- Comment #1 from Ed Catmur --- Flags: -O1 -Wstringop-overflow=1 https://godbolt.org/z/8r8roz7Pa

[Bug c/105585] New: [12/13 Regression] Spurious stringop-overflow warning with

2022-05-12 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Reduced (from code in abseil-cpp): #include struct S { int i; std::atomic a; }; S* q(); void f(); void g(bool b) { auto p = b ? q

[Bug tree-optimization/105545] [12/13 Regression] Warning for string assignment with _GLIBCXX_ASSERTIONS since r12-3347-g8af8abfbbace49e6

2022-05-12 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105545 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #3 from Ed

[Bug c++/105425] New: ambiguous template instantiation with hana::when

2022-04-28 Thread ed at catmur dot uk via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Simplified: template struct when; template constexpr int B = 1; template struct A; template struct A> {}; // fallback template struct A == 1>> {}; A> a; &q

[Bug libstdc++/105027] New: Missing constraints on std::bit_cast

2022-03-22 Thread ed at catmur dot uk via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- [bit.cast] Constraints (nb. prior to P1719R2 these were specified as SFINAE, but they have been there since the start): (1.1) sizeof(To) == sizeof(From) is true; (1.2

[Bug c++/104996] [10/11/12 Regression] Overload resolution over rvalue/const lvalue array reference parameters for an init. list argument incorrectly picks the const lvalue ref. overload

2022-03-22 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104996 --- Comment #5 from Ed Catmur --- Posted https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592154.html

[Bug c++/104996] [10/11/12 Regression] Overload resolution over rvalue/const lvalue array reference parameters for an init. list argument incorrectly picks the const lvalue ref. overload

2022-03-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104996 --- Comment #4 from Ed Catmur --- (In reply to Patrick Palka from comment #2) > We started rejecting the commented out static_assert after > r10-3740-g89e0a492af5bec. Thanks, that accords with my analysis - the branch in call.cc:compare_ics tha

[Bug c++/104996] Overload resolution over rvalue/const lvalue array reference parameters for an init. list argument incorrectly picks the const lvalue ref. overload

2022-03-21 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104996 --- Comment #1 from Ed Catmur --- This should fix it: https://github.com/gcc-mirror/gcc/compare/master...ecatmur:pr-104996 Please test and report back.

[Bug c++/69623] Invalid deduction of non-trailing template parameter pack

2022-03-15 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69623 --- Comment #8 from Ed Catmur --- (In reply to jim x from comment #7) > > auto f(auto..., auto a, auto...) { return a; } > > IIUC, this is just disallowed since all arguments would only match the first > function parameter pack. Maybe?

[Bug c++/69623] Invalid deduction of non-trailing template parameter pack

2022-03-14 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69623 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #6 from Ed

[Bug c++/70536] g++ doesn't emit DW_AT_name for DW_TAG_GNU_formal_parameter_pack

2022-03-13 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70536 --- Comment #4 from Ed Catmur --- Posted: https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591678.html

[Bug c++/77465] [DR909] rejected C-style cast involving casting away constness from result of conversion operator

2022-03-13 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77465 --- Comment #4 from Ed Catmur --- Branch: https://github.com/gcc-mirror/gcc/compare/master...ecatmur:so-66816741

[Bug c++/70536] g++ doesn't emit DW_AT_name for DW_TAG_GNU_formal_parameter_pack

2022-03-12 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70536 --- Comment #3 from Ed Catmur --- Updated: https://github.com/gcc-mirror/gcc/compare/master...ecatmur:pr-70536

[Bug c++/77465] [DR909] rejected C-style cast involving casting away constness from result of conversion operator

2021-12-30 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77465 --- Comment #3 from Ed Catmur --- Sent patches to mailing list: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587495.html

[Bug c++/92944] [concepts] redefinition error when using constrained structure template inside namespace

2021-12-17 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92944 --- Comment #2 from Ed Catmur --- Sorry, meant to link this: https://quuxplusone.github.io/blog/2021/10/27/dont-reopen-namespace-std/

[Bug c++/92944] [concepts] redefinition error when using constrained structure template inside namespace

2021-12-14 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92944 --- Comment #1 from Ed Catmur --- This becomes problematic when N::Q is std::hash; we are encouraged not to reopen namespace std but to specialize std::hash from the root namespace. Example: #include template constexpr bool P = false; template

[Bug c++/102047] ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept

2021-08-24 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102047 --- Comment #1 from Ed Catmur --- cf. https://bugs.llvm.org/show_bug.cgi?id=51604

[Bug c++/102047] New: ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept

2021-08-24 Thread ed at catmur dot uk via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template concept A = true; template concept M = requires { L.template operator()(); }; template concept C = requires(T t

[Bug c++/101988] New: Accepts invalid new-expression of array of deduced class template

2021-08-19 Thread ed at catmur dot uk via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template struct A { A(T); }; auto p = new A[]{1}; g++ (Compiler-Explorer-Build-gcc-f0fca213bc52644ba896da622b35842a6157bd98-binutils-2.36.1

[Bug sanitizer/100878] enabling UBSAN leads to false positive `'this' pointer is null` when casting lambda to function pointer

2021-07-20 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100878 --- Comment #1 from Ed Catmur --- Per godbolt, this appears to be fixed on trunk: https://godbolt.org/z/xxz8ecxzK g++ (Compiler-Explorer-Build-gcc-48e8a7a677b8356df946cd12fbb215538828e747-binutils-2.36.1) 12.0.0 20210707 (experimental)

[Bug c++/99994] New: internal compiler error: trying to capture 'f' in instantiation of generic lambda within constraints_satisfied_p

2021-04-09 Thread ed at catmur dot uk via Gcc-bugs
Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- In godbolt gcc 11.0.1 20210408: int main() { auto f = [](int

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

2020-10-13 Thread ed at catmur dot uk via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- #include template void f(T x) { std::same_as auto y = x; } int main() { f(1); } In file included from :1: : In instantiation of

[Bug c++/96675] New: tautological-compare warning emitted for NTTP bitwise comparison

2020-08-18 Thread ed at catmur dot uk
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- template constexpr bool f(char d) { return 'a' <= c && c <= 'z' ? (d | 0x20) == c : '

[Bug c++/95349] Using std::launder(p) produces unexpected behavior where (p) produces expected behavior

2020-05-29 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95349 --- Comment #12 from Ed Catmur --- (In reply to Richard Biener from comment #11) > Note that for C++ types you can apply memcpy to the placement new is not > needed since object re-use terminates lifetime of the previous object and > starts lifet

[Bug c++/95349] Using std::launder(p) produces unexpected behavior where (p) produces expected behavior

2020-05-29 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95349 --- Comment #9 from Ed Catmur --- (In reply to Jonathan Wakely from comment #4) > I don't know the answer, and I don't know why it's useful to try this anyway. If I'm reading P0593 correctly (I may not be), this would be a valid implementation o

[Bug c++/95344] New: Wparentheses (assignment used as truth value) on parenthesized ternary conditional E2

2020-05-26 Thread ed at catmur dot uk
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- void f(int i) { bool b = false; if (i == 99 ? (b = true) : false) ; } warning: suggest parentheses around

[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate

2020-04-02 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #6 from Ed

[Bug c++/36566] Cannot bind packed field

2020-03-03 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566 --- Comment #11 from Ed Catmur --- (In reply to rene.rahn from comment #10) > I know this is quite old now. But can someone explain me why using `#pragma > pack(push, 1)` does work then? `#pragma pack` has sharper edges. It will let you take un

[Bug c++/92015] New: internal compiler error: in cxx_eval_array_reference, at cp/constexpr.c:2568

2019-10-07 Thread ed at catmur dot uk
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- when indexing a char array initialized from a string literal in constexpr context: struct S1 { char c[6] {'h', 'e

[Bug c++/80667] [c++1z] ice segfault on partial specialization with non-type template parameter

2019-06-19 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80667 --- Comment #3 from Ed Catmur --- Agreed, gcc is OK since 7.2, selecting the latter partial specialization (as with -std=c++14). OK to mark as fixed.

[Bug c++/80871] Template partial ordering considered non-ambiguous with deduced and non-deduced parameter packs

2019-02-18 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80871 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #2 from Ed

[Bug c++/80871] Template partial ordering considered non-ambiguous with deduced and non-deduced parameter packs

2019-02-18 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80871 --- Comment #3 from Ed Catmur --- Sorry. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80438

[Bug c++/80438] Variadic template class argument deduction failure from variadic constructor deduction guide

2019-02-18 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80438 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #2 from Ed

[Bug c++/66476] Erroneous initializer_list lifetime extension from temporary initializer_list

2018-05-24 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66476 Ed Catmur changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c++/66476] Erroneous initializer_list lifetime extension from temporary initializer_list

2018-05-24 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66476 Ed Catmur changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))

2018-05-16 Thread ed at catmur dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 Ed Catmur changed: What|Removed |Added CC||ed at catmur dot uk --- Comment #34 from Ed