[Bug c++/115339] Missing -Wpedantic warning for a declarative nested-name-specifier with a decltype-specifier.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115339 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=68996 --- Comment #1 from Marek Polacek --- I think it's basically a dup of bug 68996.
[Bug c++/115319] ICE when mutating a captured parameter in an explicit-this lambda if a capture is not trivially copyable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115319 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Last reconfirmed||2024-06-03 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek --- Confirmed. > Said friend claims to encounter like billions of ICEs every day Highly unlikely. But good bug reports are always welcome.
[Bug c++/115296] CTAD fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115296 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Last reconfirmed||2024-05-31 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Doesn't look like a regression. #0 error_at (loc=74842051, gmsgid=0x38de910 "size %qE of array exceeds maximum object size %qE") at /home/mpolacek/src/gcc/gcc/diagnostic.cc:2137 #1 0x0129b72e in invalid_array_size_error (loc=74842051, error=cst_size_too_big, size=, name=) at /home/mpolacek/src/gcc/gcc/c-family/c-common.cc:9212 #2 0x0129b8e2 in valid_array_size_p (loc=74842051, t=, name=, complain=true) at /home/mpolacek/src/gcc/gcc/c-family/c-common.cc:9263 #3 0x00ee5c74 in compute_array_index_type_loc (name_loc=74842051, name=, size=, complain=3) at /home/mpolacek/src/gcc/gcc/cp/decl.cc:11653 #4 0x00ee61cd in compute_array_index_type (name=, size=, complain=3) at /home/mpolacek/src/gcc/gcc/cp/decl.cc:11778 #5 0x0111fc4b in tsubst (t=, args=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:16317 #6 0x011217bf in tsubst (t=, args=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:16742 #7 0x0111f4a7 in tsubst (t=, args=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:16239 #8 0x0111d85f in tsubst_arg_types (arg_types=, args=, end=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:15749 #9 0x0111dc2d in tsubst_function_type (t=, args=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:15854 #10 0x011216de in tsubst (t=, args=, complain=3, in_decl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:16727 #11 0x01112526 in tsubst_function_decl (t=, args=, complain=3, lambda_fntype=, use_spec_table=false) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:14560 #12 0x0111a255 in tsubst_decl (t=, args=, complain=3, use_spec_table=false) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:15131 #13 0x01165243 in alias_ctad_tweaks (tmpl=, uguides=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:30380 #14 0x01166b4d in deduction_guides_for (tmpl=, any_dguides_p=@0x7fffb7ef: true, complain=3) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:30714 #15 0x01167a17 in do_class_deduction (ptype=, tmpl=, init=, outer_targs=, flags=1, complain=3) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:30878 #16 0x01168d77 in do_auto_deduction (type=, init=, auto_node=, complain=3, context=adc_variable_type, outer_targs=, flags=1, tmpl=) at /home/mpolacek/src/gcc/gcc/cp/pt.cc:31089
[Bug c++/115283] [14 Regression] "used but never defined" with extern templates
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115283 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org, ||ppalka at gcc dot gnu.org --- Comment #1 from Marek Polacek --- Started with r14-6789.
[Bug c++/115266] [cwg2389] Agreement of deduced and explicitly-specified variable types
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115266 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Last reconfirmed||2024-05-29 Status|UNCONFIRMED |NEW Ever confirmed|0 |1
[Bug c++/109396] Winit-self doesn't warn when std::move()-d
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109396 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #3 from Marek Polacek --- Fixed.
[Bug c++/114707] Mark TARGET_EXPRs for function arguments eliding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114707 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Marek Polacek --- Done.
[Bug c++/114983] The -Wsizeof-array-div warning suppression using extra parenthesis (which is suggested by in the warning itself) doesn't work inside templated code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114983 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Marek Polacek --- Fixed.
[Bug c++/115165] ICE on -ftime-report with module and c++2b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115165 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2024-05-20 Ever confirmed|0 |1 CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- Confirmed.
[Bug c++/115121] ++this is accepted in uninstantiated template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115121 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Last reconfirmed||2024-05-16 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #19 from Marek Polacek --- Ought to be fully fixed now.
[Bug c++/94404] [meta-bug] C++ core issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94404 Bug 94404 depends on bug 113760, which changed state. Bug 113760 Summary: [DR1693] gcc rejects valid empty-declaration in pedantic mode https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/113920] Make -std=gnu++20 default for GCC 16
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113920 --- Comment #1 from Marek Polacek --- Now targeting GCC 16.
[Bug c++/115079] unexpected error with partial specialization of template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115079 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2024-05-14 Ever confirmed|0 |1 CC||mpolacek at gcc dot gnu.org
[Bug c++/115090] ICE in gimplify_expr, at gimplify.cc:18907 (deduced this)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115090 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Last reconfirmed||2024-05-14 Ever confirmed|0 |1 --- Comment #2 from Marek Polacek --- Started with r14-7075: commit fbc980d85149409ce62c22f48d3693113803929e Author: waffl3x Date: Sun Jan 7 00:01:48 2024 + c++: P0847R7 (deducing this) - initial functionality. [PR102609]
[Bug c++/115053] gcc crashed without back trace
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115053 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- Can't reproduce: $ time ./cc1plus -quiet 115053.C -std=c++20 real0m0.016s user0m0.010s sys 0m0.006s same with gcc 14 and 13.
[Bug c++/115074] incorrect stringop-overflow warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115074 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=101361 Ever confirmed|0 |1 Last reconfirmed||2024-05-13 Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek --- Confirmed, I think. Doesn't look like a dup of bug 101361. In file included from 115074.C:2: In constructor ‘constexpr std::__detail::__variant::_Variant_storage::_Variant_storage(std::in_place_index_t<_Np>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}; _Types = {int}]’, inlined from ‘constexpr std::__detail::__variant::_Copy_ctor_base::_Copy_ctor_base(std::in_place_index_t<_Idx>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}][inherited from std::__detail::__variant::_Variant_storage]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:611:20, inlined from ‘constexpr std::__detail::__variant::_Move_ctor_base::_Move_ctor_base(std::in_place_index_t<_Idx>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}][inherited from std::__detail::__variant::_Variant_storage]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:649:20, inlined from ‘constexpr std::__detail::__variant::_Copy_assign_base::_Copy_assign_base(std::in_place_index_t<_Idx>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}][inherited from std::__detail::__variant::_Variant_storage]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:701:20, inlined from ‘constexpr std::__detail::__variant::_Move_assign_base::_Move_assign_base(std::in_place_index_t<_Idx>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}][inherited from std::__detail::__variant::_Variant_storage]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:755:20, inlined from ‘constexpr std::__detail::__variant::_Variant_base<_Types>::_Variant_base(std::in_place_index_t<_Np>, _Args&& ...) [with long unsigned int _Np = 0; _Args = {}; _Types = {int}]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:774:45, inlined from ‘constexpr std::__detail::__variant::_Variant_base<_Types>::_Variant_base() [with _Types = {int}]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:769:40, inlined from ‘constexpr std::variant<_Types>::variant() requires is_default_constructible_v::type> [with _Types = {int}]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:1431:7, inlined from ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = variant; _Args = {}]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_construct.h:97:14, inlined from ‘static constexpr void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::variant; _Args = {}; _Tp = std::variant]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:536:21, inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}; _Tp = std::variant; _Alloc = std::allocator >]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/vector.tcc:117:30, inlined from ‘VariantVector::VariantVector()’ at 115074.C:14:26: /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/variant:534:9: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 534 | _M_index{_Np} | ^ In file included from /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/c++allocator.h:33, from /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/allocator.h:46, from /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/vector:63, from 115074.C:1: In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::variant]’, inlined from ‘constexpr _Tp* std::allocator< >::allocate(std::size_t) [with _Tp = std::variant]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/allocator.h:196:40, inlined from ‘static constexpr _Tp* std::allocator_traits >::allocate(allocator_type&, size_type) [with _Tp = std::variant]’ at /home/mpolacek/x/trunk/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:4
[Bug c++/105644] ICE in a fold expression with a requires expression: in iterative_hash_template_arg, at cp/pt.cc:1805
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105644 Marek Polacek changed: What|Removed |Added CC||hlewin at gmx dot de --- Comment #4 from Marek Polacek --- *** Bug 115075 has been marked as a duplicate of this bug. ***
[Bug c++/115075] internal_compiler_error during compilation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115075 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #2 from Marek Polacek --- Reproduced with latest trunk, but I think it's a dup. *** This bug has been marked as a duplicate of bug 105644 ***
[Bug c++/114983] The -Wsizeof-array-div warning suppression using extra parenthesis (which is suggested by in the warning itself) doesn't work inside templated code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114983 --- Comment #2 from Marek Polacek --- Fixed on trunk so far, will backport to 14.
[Bug c++/85889] lambda expression can capture structured bindings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Marek Polacek --- A -Wc++20-extensions warning added in GCC 15.
[Bug c++/114994] fmtlib named argument compiler error introduced in g++-14.1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114994 Marek Polacek changed: What|Removed |Added Keywords||needs-reduction CC||mpolacek at gcc dot gnu.org, ||ppalka at gcc dot gnu.org --- Comment #1 from Marek Polacek --- Looks like it started with r14-4111: commit 6e92a6a2a72d3b7a5e1b29042d8a6a43fe1085aa Author: Patrick Palka Date: Mon Sep 18 14:47:52 2023 -0400 c++: non-dependent assignment checking [PR63198, PR18474]
[Bug c++/114986] Seemingly incorrect "ignoring packed attribute" warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114986 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- The warning appeared with commit a37e8ce3b66325f0c6de55c80d50ac1664c3d0eb Author: Jason Merrill Date: Tue Dec 14 17:00:40 2021 -0500 c++: layout of aggregate base with DMI [PR103681]
[Bug c++/113582] incorrect warning about unused label with `pragma GCC diagnostic` around the unused label
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113582 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Marek Polacek --- Fixed in GCC 15.
[Bug c++/114983] The -Wsizeof-array-div warning suppression using extra parenthesis (which is suggested by in the warning itself) doesn't work inside templated code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114983 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Last reconfirmed||2024-05-08 Status|UNCONFIRMED |ASSIGNED
[Bug c++/114854] [11/12/13/14/15 Regression] checking ICE with default initializer of const reference member at cp/cp-gimplify.cc:900 since r10-5822
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114854 --- Comment #2 from Marek Polacek --- I'm using this slightly modified test: ``` class Vector { int m_size; }; struct S { const Vector {}; }; void spawn(S); void test() { spawn({}); } ``` To initialize S we generate: D.2848 = {.vec=(const struct Vector &) _EXPR } where the TARGET_EXPR is marked TARGET_EXPR_DIRECT_INIT_P, so we expect it to be elided. But here it serves as a temporary for Vector{} to which the reference is bound, so I think it can't be TARGET_EXPR_DIRECT_INIT_P.
[Bug c/71255] Implement #pragma may_alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71255 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|SUSPENDED |RESOLVED --- Comment #30 from Marek Polacek --- Looks like there's nothing more to do.
[Bug c++/114962] For each iteration in static assert fails to compile with pointer to member functions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114962 Marek Polacek changed: What|Removed |Added Keywords|needs-reduction | --- Comment #3 from Marek Polacek --- // PR c++/114962 template struct __array_traits { using _Type = _Tp[_Nm]; }; template struct array { typedef _Tp value_type; typedef value_type *const_iterator; __array_traits<_Tp, _Nm>::_Type _M_elems; constexpr const_iterator begin() const { return const_iterator(_M_elems); } constexpr const_iterator end() const { return const_iterator(); } constexpr value_type [](long __n) { return _M_elems[__n]; } }; struct A { void third(); static constexpr array kArray = [] { array a; a[0] = a[1] = a[2] = ::third; return a; }(); static_assert([] { for (auto item : kArray) if (item) return true; return false; }(), ""); };
[Bug c++/114962] For each iteration in static assert fails to compile with pointer to member functions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114962 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- I agree; seems valid to me.
[Bug middle-end/114913] "verify_gimple failed" due to addition of two constexpr strings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114913 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed||2024-05-01 Ever confirmed|0 |1
[Bug c++/114909] False positive diagnostic from -Wdangling-reference
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114909 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- fn1 returns a reference and takes a temporary as an argument; we can't prove that it doesn't return a reference to the temporary, so we warn. Please add [[gnu::no_dangling]] to fn1 to suppress the warning.
[Bug c++/114901] GCC internal_error on CTAD alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114901 --- Comment #3 from Marek Polacek --- Before, it was rejected: 114901.C:21:23: error: class template argument deduction failed: 21 | T::AFoo s{1, 2}; | ^ 114901.C:21:23: error: no matching function for call to ‘Foo(int, int)’
[Bug c++/114901] GCC internal_error on CTAD alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114901 Marek Polacek changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #2 from Marek Polacek --- Started with r13-6555: commit 9e6170098d5e7756e85e880f8f4cb18e885a64fd Author: Jason Merrill Date: Wed Feb 8 22:06:22 2023 -0800 c++: fix alias CTAD [PR105841]
[Bug c++/114901] GCC internal_error on CTAD alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114901 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed||2024-04-30 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. $ ./cc1plus -quiet 114901.C -std=c++20 114901.C: In static member function ‘static T::Foo(int, Y2)-> Foo requires __is_deducible (T::AFoo, T::Foo)’: 114901.C:21:23: internal compiler error: in keep_template_parm, at cp/pt.cc:10933 21 | T::AFoo s{1, 2}; | ^ 0x10dffa0 keep_template_parm /home/mpolacek/src/gcc/gcc/cp/pt.cc:10933 0x10df925 for_each_template_parm_r /home/mpolacek/src/gcc/gcc/cp/pt.cc:10740 0x1ec3aef walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) /home/mpolacek/src/gcc/gcc/tree.cc:11429 0x10dfc15 for_each_template_parm /home/mpolacek/src/gcc/gcc/cp/pt.cc:10843 0x10e0362 any_template_parm_r /home/mpolacek/src/gcc/gcc/cp/pt.cc:10975 0x10dec7e for_each_template_parm_r /home/mpolacek/src/gcc/gcc/cp/pt.cc:10632 0x1ec3aef walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) /home/mpolacek/src/gcc/gcc/tree.cc:11429 0x10dfc15 for_each_template_parm /home/mpolacek/src/gcc/gcc/cp/pt.cc:10843 0x10e07aa find_template_parameter_info::find_in(tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:11023 0x10e0a22 find_template_parameters(tree_node*, tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:11075 0xe2a236 build_parameter_mapping /home/mpolacek/src/gcc/gcc/cp/constraint.cc:594 0xe2aa02 normalize_atom /home/mpolacek/src/gcc/gcc/cp/constraint.cc:819 0xe2ad29 normalize_expression /home/mpolacek/src/gcc/gcc/cp/constraint.cc:886 0xe2a4c9 normalize_logical_operation /home/mpolacek/src/gcc/gcc/cp/constraint.cc:692 0xe2acb2 normalize_expression /home/mpolacek/src/gcc/gcc/cp/constraint.cc:882 0xe2ad82 get_normalized_constraints /home/mpolacek/src/gcc/gcc/cp/constraint.cc:898 0xe2ae40 get_normalized_constraints_from_info /home/mpolacek/src/gcc/gcc/cp/constraint.cc:914 0xe2b0df get_normalized_constraints_from_decl /home/mpolacek/src/gcc/gcc/cp/constraint.cc:990 0xe33953 satisfy_declaration_constraints /home/mpolacek/src/gcc/gcc/cp/constraint.cc:3378 0xe33a70 constraint_satisfaction_value /home/mpolacek/src/gcc/gcc/cp/constraint.cc:3406
[Bug c/114869] GCC says nullptr_t is a C built in but it should be in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED
[Bug c++/114844] A trivial but noexcept(false) destructor is incorrectly considered non-throwing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114844 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- This reminds me of my old patch: https://gcc.gnu.org/legacy-ml/gcc-patches/2019-09/msg00311.html this sounds like the problem I hit when working on the patch.
[Bug c++/114854] [11/12/13/14 Regression] checking ICE with default initializer of const reference member at cp/cp-gimplify.cc:900 since r10-5822
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114854 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org CC||mpolacek at gcc dot gnu.org Priority|P3 |P2
[Bug c++/109966] [13 Regression] ICE in gimplify_var_or_parm_decl, à gimplify.cc:3058
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109966 Marek Polacek changed: What|Removed |Added Summary|[13/14 Regression] ICE in |[13 Regression] ICE in |gimplify_var_or_parm_decl, |gimplify_var_or_parm_decl, |à gimplify.cc:3058 |à gimplify.cc:3058 --- Comment #7 from Marek Polacek --- Fixed on trunk with r14-9950-g60399256317807.
[Bug c++/113300] GCC rejects valid program involving copy list initialization A a = {} of a class with explicit and non explicit default constructors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113300 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #6 from Marek Polacek --- This is CWG 2856 https://cplusplus.github.io/CWG/issues/2856.html
[Bug c++/84849] [DR1228] Ambiguous resolution of braze initializer list to a class with explicit constructors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #11 from Marek Polacek --- DR1228 was closed as NAD.
[Bug c++/114764] noexcept on a friend complains about incomplete type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114764 --- Comment #6 from Marek Polacek --- The former: I'd have to introduce checking that tracks all the declarations and checks that their noexcept-specs match after delayed parsing has taken place. It's not impossible but I didn't (and still don't) think that it's something worth doing. Sorry.
[Bug c++/114764] noexcept on a friend complains about incomplete type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114764 --- Comment #4 from Marek Polacek --- I don't think so, it's the same problem. You could have struct S { friend void f() noexcept(noexcept(a)); friend void f() noexcept(noexcept(b)) { } int a; int b; }; and we'd have to track if the exception specifications match.
[Bug c++/114764] noexcept on a friend complains about incomplete type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114764 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- I think I remember discussing this on the Core list. IIRC the trouble was that friend decls can be redeclared and that made it quite hard to implement right. So the current behavior seems OK, and perhaps the standard should change.
[Bug c++/114707] Mark TARGET_EXPRs for function arguments eliding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114707 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2024-04-12 --- Comment #1 from Marek Polacek --- Mine for GCC 15.
[Bug c++/114707] New: Mark TARGET_EXPRs for function arguments eliding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114707 Bug ID: 114707 Summary: Mark TARGET_EXPRs for function arguments eliding Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- >From <https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649426.html>: let's do set_target_expr_eliding in convert_for_arg_passing. Then the pset in replace_placeholders_for_class_temp_r can go.
[Bug c++/114705] New: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114705 Bug ID: 114705 Summary: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- clang++ warns here: ``` [[noreturn]] constexpr void f() {} constexpr int x = (f(), 0); ``` l.C:1:36: warning: function declared 'noreturn' should not return [-Winvalid-noreturn] 1 | [[noreturn]] constexpr void f() {} |^ but we don't. Related to https://cplusplus.github.io/CWG/issues/2763.html
[Bug c++/18635] [DR 504] use of uninitialised reference accepted (without -Wuninitialized) in C++ front end
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18635 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #22 from Marek Polacek --- Now closed as NAD: https://cplusplus.github.io/CWG/issues/504.html
[Bug c++/94404] [meta-bug] C++ core issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94404 Bug 94404 depends on bug 110216, which changed state. Bug 110216 Summary: tuple_size requirements for structured binding has not been updated after DR 2386 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110216 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/110216] tuple_size requirements for structured binding has not been updated after DR 2386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110216 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Marek Polacek --- Seems to be fixed; I'm updating cxx-dr-status.html.
[Bug c++/114697] New: [DR 233] references in user defined conversions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114697 Bug ID: 114697 Summary: [DR 233] references in user defined conversions Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- This should compile: ``` struct Z {}; struct A { operator Z&(); // #1 operator const Z&(); }; struct B { operator Z(); // #2 operator const Z&&(); }; const Z& r1 = A(); // OK, uses #1 const Z&& r2 = B(); // OK, uses #2 ``` but we reject it with: cwg233.C:13:15: error: conversion from ‘A’ to ‘const Z&’ is ambiguous 13 | const Z& r1 = A(); // OK, uses #1 | ^~~ cwg233.C:4:3: note: candidate: ‘A::operator Z&()’ 4 | operator Z&(); // #1 | ^~~~ cwg233.C:5:3: note: candidate: ‘A::operator const Z&()’ 5 | operator const Z&(); | ^~~~
[Bug c++/114625] requires { T{}; } wrongly returns false when T{} is ill-formed while in concept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114625 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #4 from Marek Polacek --- Thanks. Probably GCC 15 work.
[Bug target/114606] -Whardened doesn't trigger with -fcf-protection=none
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114606 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #2 from Marek Polacek --- Fixed.
[Bug c++/91079] [DR 1881] Standard-layout classes and unnamed bit-fields
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91079 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Marek Polacek --- Fixed.
[Bug c++/94404] [meta-bug] C++ core issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94404 Bug 94404 depends on bug 91079, which changed state. Bug 91079 Summary: [DR 1881] Standard-layout classes and unnamed bit-fields https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91079 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug driver/114606] -Whardened doesn't trigger with -fcf-protection=none
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114606 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Last reconfirmed||2024-04-05 Ever confirmed|0 |1
[Bug driver/114606] New: -Whardened doesn't trigger with -fcf-protection=none
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114606 Bug ID: 114606 Summary: -Whardened doesn't trigger with -fcf-protection=none Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- -Whardened warns when -fhardened couldn't enable a hardening option because that option was disabled on the command line, e.g.: $ ./cc1plus -quiet g.C -fhardened -O2 -fstack-protector cc1plus: warning: ‘-fstack-protector-strong’ is not enabled by ‘-fhardened’ because it was specified on the command line [-Whardened] but it doesn't work as expected with -fcf-protection=none: $ ./cc1plus -quiet g.C -fhardened -O2 -fcf-protection=none # should warn because we're checking == CF_NONE which doesn't distinguish between nothing and -fcf-protection=none. I'm hoping the fix is simply to use OPTION_SET_P.
[Bug c++/111132] [11/12/13 Regression] Function redeclaration in local scope breaks constant expression evaluation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression] |Function redeclaration in |Function redeclaration in |local scope breaks constant |local scope breaks constant |expression evaluation |expression evaluation --- Comment #5 from Marek Polacek --- Fixed on trunk so far.
[Bug c++/91079] [DR 1881] Standard-layout classes and unnamed bit-fields
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91079 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Keywords|needs-bisection | Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- Fixed by r12-2975: commit 32c3a75390623a0470df52af13f78baddd562981 Author: Jakub Jelinek Date: Tue Aug 17 21:06:39 2021 +0200 c++: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539] that patch doesn't have any __is_standard_layout tests so I'll add mine.
[Bug c++/12944] [meta-bug] C++ name-lookup problems
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12944 Bug 12944 depends on bug 85570, which changed state. Bug 85570 Summary: Resolution of unqualified-id in member access involving templates fails https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85570 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/85570] Resolution of unqualified-id in member access involving templates fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85570 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Marek Polacek --- Fixed then.
[Bug c++/85570] Resolution of unqualified-id in member access involving templates fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85570 Marek Polacek changed: What|Removed |Added Keywords|needs-bisection | CC||mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek --- Compiles since r12-3643: commit 18b57c1d4a8777bedfe4ed47166f033e71bc144b Author: Jason Merrill Date: Fri Sep 17 14:18:55 2021 -0400 c++: improve lookup of member-qualified names I guess I should add the test.
[Bug c++/114569] GCC accepts forming pointer to function type which is ref qualified
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114569 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek --- [dcl.fct]/10: A function type with a cv-qualifier-seq or a ref-qualifier shall appear only as: -- [...] -- the type-id of a template-argument for a type-parameter So the code should compile.
[Bug c++/114479] [14 Regression] std::is_array_v changed from false to true in GCC 14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114479 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Marek Polacek --- Fixed.
[Bug c++/103825] ICE on switch on enum class in bitfield
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103825 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #6 from Marek Polacek --- Fixed for 14/13.
[Bug c++/111132] [11/12/13/14 Regression] Function redeclaration in local scope breaks constant expression evaluation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org CC||mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Marek Polacek --- I think I have a patch.
[Bug c++/114549] [11/12/13 Regression] GCC >= 10.1 selects the wrong overload of C++20 reversed operator== function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114549 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Keywords|needs-bisection | --- Comment #4 from Marek Polacek --- Looks like it's changed in r14-6221. Doesn't look backportable.
[Bug c++/110338] Implement C++26 language features
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110338 Bug 110338 depends on bug 114455, which changed state. Bug 114455 Summary: [C++26] P2748R5 - Disallow binding a returned reference to a temporary https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114455 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/114455] [C++26] P2748R5 - Disallow binding a returned reference to a temporary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114455 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #2 from Marek Polacek --- Implemented in r14-9738-gbba118db3f63cb for GCC 14.0. commit bba118db3f63cb1e3953a014aa3ac2ad89908950 Author: Jason Merrill Date: Thu Mar 28 21:33:57 2024 -0400 c++: C++26 returning reference to temporary
[Bug c++/114479] [14 Regression] std::is_array_v changed from false to true in GCC 14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114479 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #4 from Marek Polacek --- Thanks. I'll go ahead and submit my patch.
[Bug c++/114479] [14 Regression] std::is_array_v changed from false to true in GCC 14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114479 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- I think the patch is simply --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -12439,7 +12439,9 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2) return CP_AGGREGATE_TYPE_P (type1); case CPTK_IS_ARRAY: - return type_code1 == ARRAY_TYPE; + return (type_code1 == ARRAY_TYPE + /* ??? We don't want to report T[0] as being an array type. */ + && !(TYPE_SIZE (type1) && integer_zerop (TYPE_SIZE (type1; case CPTK_IS_ASSIGNABLE: return is_xible (MODIFY_EXPR, type1, type2); but are we *sure* that we don't want to treat int[0] as an array type? It's not clear to me that https://github.com/llvm/llvm-project/pull/86652 reached a consensus.
[Bug c++/111426] [11/12/13/14 Regression] "error: use of deleted function" printed twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111426 --- Comment #3 from Marek Polacek --- I meant that g++5 emitted 111426.C:7:3: error: use of deleted function ‘D::D()’ D d; ^ 111426.C:6:7: note: ‘D::D()’ is implicitly deleted because the default definition would be ill-formed: class D : public X { }; ^ 111426.C:6:7: error: use of deleted function ‘X::~X()’ 111426.C:3:3: note: declared here ~X() = delete; ^ which seems more user-friendly than 4 errors, and saying that X::~X() is deleted twice. clang++ emits only one error. But, maybe it's not that bad after all. Feel free to close this.
[Bug c++/103825] ICE on switch on enum class in bitfield
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103825 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED CC||mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- Started with r5-3726-g083e891e69429f, so mine. commit 083e891e69429f93b958f6c18e2d52f515bae572 Author: Marek Polacek Date: Wed Sep 24 17:23:56 2014 + re PR c/61405 (Not emitting "enumeration value not handled in switch" warning for bit-field enums)
[Bug c++/67491] [meta-bug] concepts issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 100557, which changed state. Bug 100557 Summary: [11/12/13/14 Regression] Internal compiler error: Error reporting routines re-entered. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/100557] [11/12/13/14 Regression] Internal compiler error: Error reporting routines re-entered.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Marek Polacek --- Added.
[Bug c++/100557] [11/12/13/14 Regression] Internal compiler error: Error reporting routines re-entered.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED CC||mpolacek at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #6 from Marek Polacek --- Fixed by Patrick's r14-3809. I'll add the test; the patch was fixing a different problem.
[Bug c++/114349] [14 regression] ICE when building qtwebengine with -std=gnu++14 (cxx_eval_call_expression, at cp/constexpr.cc:3027)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114349 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Marek Polacek --- Fixed.
[Bug c++/114439] [14 Regression] icu4c-73.2 build failure: invalid initializer for array member with initialization of array of struct containing arrays since r14-9622
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114439 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #5 from Marek Polacek --- Fixed.
[Bug c++/114455] [C++26] P2748R5 - Disallow binding a returned reference to a temporary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114455 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed||2024-03-25 --- Comment #1 from Marek Polacek --- Confirmed. I'm interested.
[Bug c++/114460] [C++26] P3106R1 - Clarifying rules for brace elision in aggregate initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114460 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-03-25 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek --- Confirmed. I'm interested.
[Bug c++/114439] [14 Regression] icu4c-73.2 build failure: invalid initializer for array member with initialization of array of struct containing arrays since r14-9622
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114439 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED
[Bug c++/59465] [11/12/13 Regression] g++ allows direct-initialization of an array of class type from another array in a mem-initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59465 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression] g++ |g++ allows |allows |direct-initialization of an |direct-initialization of an |array of class type from|array of class type from |another array in a |another array in a |mem-initializer |mem-initializer Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Marek Polacek --- Fixed in GCC 14. I don't think I'll backport it.
[Bug c++/110323] [11/12/13 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression] Code |Code for explicit |for explicit instantiation |instantiation of template |of template method of |method of template class|template class not |not generated |generated --- Comment #11 from Marek Polacek --- Fixed on trunk so far.
[Bug c++/114395] [c++20+] std::is_constructible_v result of const reference incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114395 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2024-03-20
[Bug c++/114395] [c++20+] std::is_constructible_v result of const reference incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114395 --- Comment #6 from Marek Polacek --- Right, another design principle is that () should work where {} works, and const B {a}; works. A(b) previously didn't work so it's not really changing meaning. So not a bug IMHO.
[Bug c++/114395] [c++20+] std::is_constructible_v result of const reference incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114395 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- Changed with r10-5137-g43aae289866f5e: commit 43aae289866f5ea55d187444520412554aa2e171 Author: Marek Polacek Date: Tue Dec 3 15:59:40 2019 + PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
[Bug c++/114349] [14 regression] ICE when building qtwebengine with -std=gnu++14 (cxx_eval_call_expression, at cp/constexpr.cc:3027)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114349 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-03-15 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Priority|P3 |P1 Status|UNCONFIRMED |ASSIGNED --- Comment #3 from Marek Polacek --- Confirmed. Started with r14-9339-gdc6c3bfb59baab, so mine, sigh. commit dc6c3bfb59baab28b998e18396c06087b6d9b0ed Author: Marek Polacek Date: Tue Mar 5 13:33:10 2024 -0500 c++: ICE with noexcept and local specialization [PR114114] I'll wait for Jakub's reduction.
[Bug c++/111075] [14 Regression] ICE on g++.dg/torture/tail-padding1.C on darwin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111075 Marek Polacek changed: What|Removed |Added Priority|P1 |P2 CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- darwin -> probably not P1.
[Bug c++/111592] [11/12/13/14 Regression] ICE on expanding argument pack into variadic constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111592 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- Started with r6-6795-g0fd9d4921f7ba2. But that's only adding an assert so the problem was probably latent.
[Bug c++/109966] [13/14 Regression] ICE in gimplify_var_or_parm_decl, à gimplify.cc:3058
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109966 --- Comment #6 from Marek Polacek --- This looks like a failure of potential_prvalue_result_of to notice that there's copy elision taking place (when initializing a field of the array arr).
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #9 from Marek Polacek --- Oh and I meant to say it's the DECL_DECLARED_INLINE_P check that makes the difference.
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #8 from Marek Polacek --- (In reply to Patrick Palka from comment #7) > I noticed we emit the function if we turn it into a non-member: > > #include > > constexpr int VAL = 1; > > template > void bar(typename std::conditional::type arg) { > } > > template void bar<1>(int arg); > > I wonder why this bug seems specific to member functions? Good question. It's because in this case bar is marked as force_output here: /* When not optimizing, also output the static functions. (see PR24561), but don't do so for always_inline functions, functions declared inline and nested functions. These were optimized out in the original implementation and it is unclear whether we want to change the behavior here. */ if (((!opt_for_fn (decl, optimize) || flag_keep_static_functions || node->no_reorder) && !node->cpp_implicit_alias && !DECL_DISREGARD_INLINE_LIMITS (decl) && !DECL_DECLARED_INLINE_P (decl) && !(DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL)) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) node->force_output = 1; and when deciding if we ought to emit the fn in symtab_node::needed_p we do: /* If the user told us it is used, then it must be so. */ if (force_output) return true; With -O the fn isn't emitted.
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #6 from Marek Polacek --- Extended test. I think all 4 should be emitted. ``` // PR c++/110323 template struct conditional { using type = T; }; template struct conditional { using type = F; }; constexpr int VAL = 1; static constexpr int getval () { return 1; } template constexpr int TVAL = 1; static struct S { constexpr operator bool() { return true; } } s; struct foo { template void bar(typename conditional::type arg) { } template void baz(typename conditional::type arg) { } template void qux(typename conditional, int, float>::type arg) { } template void lox(typename conditional::type arg) { } }; template void foo::bar<1>(int arg); template void foo::baz<1>(int arg); template void foo::qux<1>(int arg); template void foo::lox<1>(int arg); ```
[Bug c++/110031] [11/12/13 Regression] ICE with deprecated attribute and NTTP and diagnostic for deprecated printed out so much
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110031 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression] ICE |ICE with deprecated |with deprecated attribute |attribute and NTTP and |and NTTP and diagnostic for |diagnostic for deprecated |deprecated printed out so |printed out so much |much --- Comment #7 from Marek Polacek --- Fixed on trunk so far.
[Bug c++/113970] [14 Regression] pch/system-{1,2}.C fails on darwin after r14-8987-gdd9d14f7d53
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113970 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #6 from Marek Polacek --- Should we close this as fixed then?
[Bug c++/114114] [11/12/13 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression] |Internal compiler error on |Internal compiler error on |function-local conditional |function-local conditional |noexcept|noexcept --- Comment #5 from Marek Polacek --- Fixed on trunk so far.
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #5 from Marek Polacek --- VAL is constexpr, which implies const, which in the global scope implies static. Then constrain_visibility_for_template makes "struct conditional<(B == VAL), int, float>" non-TREE_PUBLIC. So with extern constexpr int VAL = 1; the test works again.
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #4 from Marek Polacek --- Ah -- if we walk into TYPE_CONTEXT (t) (here: struct conditional), then in min_vis_r we determine the visibility as VISIBILITY_ANON. Without it, it remains VISIBILITY_DEFAULT.
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 --- Comment #3 from Marek Polacek --- This makes a difference for some reason: --- a/gcc/cp/tree.cc +++ b/gcc/cp/tree.cc @@ -5542,7 +5542,7 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func, break; case TYPENAME_TYPE: - WALK_SUBTREE (TYPE_CONTEXT (t)); + //WALK_SUBTREE (TYPE_CONTEXT (t)); WALK_SUBTREE (TYPENAME_TYPE_FULLNAME (t)); *walk_subtrees_p = 0; break;
[Bug c++/110323] [11/12/13/14 Regression] Code for explicit instantiation of template method of template class not generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110323 Marek Polacek changed: What|Removed |Added Priority|P3 |P2 CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- Started with r11-291-g0f50f6daa14018: commit 0f50f6daa140186a048cbf33f54f4591eabf5f12 Author: Jason Merrill Date: Mon May 11 15:46:59 2020 -0400 c++: tree walk into TYPENAME_TYPE. ``` template struct conditional { using type = T; }; template struct conditional { using type = F; }; constexpr int VAL = 1; struct foo { template void bar(typename conditional::type arg) { } }; template void foo::bar<1>(int arg); ```