[Bug c++/115207] [constexpr] constexpr assignment rejected as non const on self-assignment test

2024-07-30 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115207 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/112318] Deprecated move ctor does not trigger -Wdeprecated-declarations when creating a std::optional

2023-12-13 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112318 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/91317] [7/8/9/10 Regression] false-positive maybe-uninitialized warning in destructor with placement new

2023-05-22 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91317 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/61754] [C++1y] [[deprecated]] attribute warns annoyingly compared to __attribute__((deprecated))

2023-05-03 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61754 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/108759] New: "mandatory copy elision" not implemented during constant evaluation redux

2023-02-10 Thread herring at lanl dot gov via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Extending the test case in (the invalid) #94537 to have a user-provided destructor does not cause the "mandato

[Bug c++/104577] needs copy constructor for class non-type template parameter

2023-02-10 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104577 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/107906] linkage of template not taken into account

2022-11-30 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107906 --- Comment #3 from S. Davis Herring --- Thanks for identifying the true common thread. > That is not a specialization, that is an instantiation. The standard uses specialization for every "version" of a template; some are just "explicit

[Bug c++/107906] New: Function template specialization given weak rather than local symbol

2022-11-28 Thread herring at lanl dot gov via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Current trunk, given <https://godbolt.org/z/aoMecfhqb> template using X=int; namespace { template using Y=int; } te

[Bug c++/66671] Failure to create a new family of templates for template alias

2022-11-28 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66671 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/106756] Overbroad friendship for nested classes

2022-08-26 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106756 --- Comment #2 from S. Davis Herring --- (In reply to Jonathan Wakely from comment #1) > "Declaring a class to be a friend implies that private and protected > members > of the class granting friendship can be named in the

[Bug c++/106756] New: Overbroad friendship for nested classes

2022-08-26 Thread herring at lanl dot gov via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Sometime since 12.2, GCC has started accepting struct A { struct B { friend int f(B*) {return i;} }; private: static int i; }; despite the express limitation in [class.nest

[Bug c++/44402] Doesn't allow friend declarations using a typedef for function type

2022-08-26 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44402 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2022-08-26 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/103876] Parameter pack not expanded in lambda within static_assert in a fold-expression of a lambda

2022-08-18 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103876 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

2022-08-11 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780 --- Comment #8 from S. Davis Herring --- I looked at P2266R3 again; it claims that the conversion function case (in #7) is actually covered by P1825R0. I think that case is questionable, since it still refers to "overload resolution to select

[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

2022-08-11 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780 --- Comment #7 from S. Davis Herring --- > In the withMove case, in C++20, we issue: > warning: moving a local object in a return statement prevents copy elision > for > template Dest withMove(); > and: > warning: redundant move in return

[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

2022-08-04 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780 --- Comment #5 from S. Davis Herring --- Perhaps I'm misunderstanding something, but your example (as well as compiling the original example with -std=c++20, which produces the same warning but now calls Dest(Dest&&) in the noMove case) means

[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

2022-08-04 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780 --- Comment #3 from S. Davis Herring --- Does this need to be language-version-dependent, given https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1825r0.html (in C++20) and

[Bug c++/12228] [DR 244/399] syntax error calling a qualified template dtor

2021-11-15 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12228 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/95849] Universal forwarding constructor inheritance resolution issue

2021-08-28 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95849 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/90493] const variable template specialization is always local

2021-08-23 Thread herring at lanl dot gov via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90493 --- Comment #4 from S. Davis Herring --- (In reply to Jonathan Wakely from comment #3) > Reduced to show just the rejects-valid part: > > template extern const int foo = 41; > // this is an error: > // error: explicit template specialization

[Bug c++/97340] New: Spurious rejection of member variable template of reference type

2020-10-08 Thread herring at lanl dot gov via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- In many recent versions of GCC, the following valid code struct A { template static constexpr const int =0; }; template

[Bug c++/85282] CWG 727 (full specialization in non-namespace scope)

2020-07-30 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/95484] New: Friend declaration of member function template has no effect

2020-06-02 Thread herring at lanl dot gov
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- The current build at Compiler Explorer rejects struct A { template operator T*() const; }; class B

[Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression

2020-03-30 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/94231] New: Invalid move constructor defaulted outside of class as deleted is accepted

2020-03-19 Thread herring at lanl dot gov
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- GCC incorrectly accepts the following: struct F {F(F&&)=delete;}; template struct M { F f; M(); M

[Bug c++/57998] Unhelpful error message when a class has no move constructor

2020-03-19 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57998 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/81349] Classes with deleted constructor templates incorrectly labeled as non-aggregates

2020-03-19 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81349 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/83258] Rejecting function pointer non-type template parameter without linkage

2020-03-17 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83258 S. Davis Herring changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment

[Bug c++/89062] class template argument deduction failure with parentheses

2019-12-19 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89062 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/83258] Rejecting function pointer non-type template parameter without linkage

2019-11-18 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83258 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/92320] Constexpr function pointer derived from lambda is not accepted as template parameter

2019-11-18 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92320 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/90493] const variable template specialization is always local

2019-11-13 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90493 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

2019-11-13 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug c++/92062] ODR-use by static_assert ignored for static member of class template

2019-10-10 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92062 S. Davis Herring changed: What|Removed |Added Keywords||wrong-code Known to work|

[Bug c++/92062] New: ODR-use by static_assert ignored for static member of class template

2019-10-10 Thread herring at lanl dot gov
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- The following program throws during static initialization iff A<0>::x is instantiated, which it must be because of the static_

[Bug c++/68092] [C++1z] error: Two symbols with same comdat_group are not linked by the same_comdat_group list.

2019-04-23 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68092 S. Davis Herring changed: What|Removed |Added CC||herring at lanl dot gov --- Comment

[Bug tree-optimization/87245] New: [missed optimization] switching on indices of struct members

2018-09-06 Thread herring at lanl dot gov
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Consider a simple struct whose members can be accessed by name or by index: struct vec {double x,y,z;}; double get(const

[Bug tree-optimization/80617] [missed optimization] Storing constant in two possibly-aliased locations

2017-05-04 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80617 --- Comment #7 from S. Davis Herring --- We can extend the C test case (thanks for that) with a shared, non-constant value (and more savings by having dead code as in the original C++ example): void foo(int *p,int *q,int x) { *q=*p=x;

[Bug tree-optimization/80617] [missed optimization] Storing constant in two possibly-aliased locations

2017-05-04 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80617 --- Comment #3 from S. Davis Herring --- Created attachment 41314 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41314=edit bad assembly test case

[Bug tree-optimization/80617] [missed optimization] Storing constant in two possibly-aliased locations

2017-05-04 Thread herring at lanl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80617 --- Comment #2 from S. Davis Herring --- So sorry. For whatever reason, copy/paste works for me thence... #include #include #include struct A { // vaguely unique_ptr-like void *p; A(A &) : p(a.release()) {} ~A()

[Bug tree-optimization/80617] New: [missed optimization] Storing constant in two possibly-aliased locations

2017-05-03 Thread herring at lanl dot gov
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: herring at lanl dot gov Target Milestone: --- Swapping (by move-construction/assignment) two instances of struct A { // vaguely unique_ptr-like

[Bug c/30116] faulty -Wformat warning with pointers to arrays

2006-12-11 Thread herring at lanl dot gov
--- Comment #2 from herring at lanl dot gov 2006-12-11 19:24 --- (In reply to comment #1) *** This bug has been marked as a duplicate of 27558 *** Thanks for finding that for me! I tried for an hour to locate this bug in the database (because I discovered it some time ago; presumably

[Bug c/30116] New: faulty -Wformat warning with pointers to arrays

2006-12-07 Thread herring at lanl dot gov
Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: herring at lanl dot gov GCC build triplet: i686-pc-linux-gnu GCC host

[Bug c++/29048] New: `x' is private error duplicated when scope specified

2006-09-12 Thread herring at lanl dot gov
at lanl dot gov GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048

[Bug c++/23520] template instantiation disables inlining

2005-08-22 Thread herring at lanl dot gov
--- Additional Comments From herring at lanl dot gov 2005-08-22 21:14 --- (In reply to comment #3) Oh, next time don't copy and paste the preprocessed source into the bug but rather attach it. Er, yeah, I feel silly now -- I found #14950 while trying to make sure that mine had been