public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114392] New: Address of overloaded function with requires
@ 2024-03-19  8:48 egor.pugin at gmail dot com
  2024-03-19 11:46 ` [Bug c++/114392] " redi at gcc dot gnu.org
  2024-03-19 22:27 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: egor.pugin at gmail dot com @ 2024-03-19  8:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114392

            Bug ID: 114392
           Summary: Address of overloaded function with requires
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egor.pugin at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/jfs98fhKK

clang, msvc seem to work.

```
template <auto N>
struct A {
    static void call() requires (N == 0) {
    }
    static void call(int x) requires (N == 1) {
    }
};

int main() {
    (&A<0>::call)();
    (&A<1>::call)(5);
}
```

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/114392] Address of overloaded function with requires
  2024-03-19  8:48 [Bug c++/114392] New: Address of overloaded function with requires egor.pugin at gmail dot com
@ 2024-03-19 11:46 ` redi at gcc dot gnu.org
  2024-03-19 22:27 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-19 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114392

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-03-19
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
c.cc: In function 'int main()':
c.cc:10:6: error: address of overloaded function with no contextual type
information
   10 |     (&A<0>::call)();
      |     ~^~~~~~~~~~~~
c.cc:11:6: error: address of overloaded function with no contextual type
information
   11 |     (&A<1>::call)(5);
      |     ~^~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/114392] Address of overloaded function with requires
  2024-03-19  8:48 [Bug c++/114392] New: Address of overloaded function with requires egor.pugin at gmail dot com
  2024-03-19 11:46 ` [Bug c++/114392] " redi at gcc dot gnu.org
@ 2024-03-19 22:27 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-19 22:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114392

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=29143

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Related to the much older bug 29143; which was fixed in GCC 4.9.0 but I suspect
the issue is in the same area even ...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-19 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19  8:48 [Bug c++/114392] New: Address of overloaded function with requires egor.pugin at gmail dot com
2024-03-19 11:46 ` [Bug c++/114392] " redi at gcc dot gnu.org
2024-03-19 22:27 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).