public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101287] New: Implicite template specialization redefines member function but compiles
@ 2021-07-01 20:34 eligorkadaf at gmail dot com
  2021-07-01 20:35 ` [Bug c++/101287] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-07-01 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101287
           Summary: Implicite template specialization redefines member
                    function but compiles
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eligorkadaf at gmail dot com
  Target Milestone: ---

It is exactly an example from the standard, so I don't thin any additional
explanations required.

https://godbolt.org/z/Ebcc7vsjq

https://eel.is/c++draft/temp.spec#temp.inst-example-3

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

* [Bug c++/101287] Implicite template specialization redefines member function but compiles
  2021-07-01 20:34 [Bug c++/101287] New: Implicite template specialization redefines member function but compiles eligorkadaf at gmail dot com
@ 2021-07-01 20:35 ` redi at gcc dot gnu.org
  2021-07-01 20:42 ` [Bug c++/101287] Implicit " eligorkadaf at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2021-07-01 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The actual code is required though, as https://gcc.gnu.org/bugs says:

template<class T>
struct C {
  void f() { T x; }
  void g() = delete;
};
C<void> c;                      // OK, definition of C<void>​::​f is not
instantiated at this point
template<> void C<int>::g() { } // error: redefinition of C<int>​::​g

int main(){}

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

* [Bug c++/101287] Implicit template specialization redefines member function but compiles
  2021-07-01 20:34 [Bug c++/101287] New: Implicite template specialization redefines member function but compiles eligorkadaf at gmail dot com
  2021-07-01 20:35 ` [Bug c++/101287] " redi at gcc dot gnu.org
@ 2021-07-01 20:42 ` eligorkadaf at gmail dot com
  2021-07-04 19:10 ` eligorkadaf at gmail dot com
  2021-07-04 19:11 ` eligorkadaf at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-07-01 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Eligor Kadaf <eligorkadaf at gmail dot com> ---
Agree, and the link was incorrect, so there is a correct one: 
https://godbolt.org/z/zEz8c7abM

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

* [Bug c++/101287] Implicit template specialization redefines member function but compiles
  2021-07-01 20:34 [Bug c++/101287] New: Implicite template specialization redefines member function but compiles eligorkadaf at gmail dot com
  2021-07-01 20:35 ` [Bug c++/101287] " redi at gcc dot gnu.org
  2021-07-01 20:42 ` [Bug c++/101287] Implicit " eligorkadaf at gmail dot com
@ 2021-07-04 19:10 ` eligorkadaf at gmail dot com
  2021-07-04 19:11 ` eligorkadaf at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-07-04 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Eligor Kadaf <eligorkadaf at gmail dot com> ---
I had found this example during the investigation of one another exmaple from
real life, which was the bug in clang, and as fas as it is marked as error in
standard I had decided it must be compile time error. However, during further
investigation of current example I have found it is an ill-formed; no
diagnostics required, so I will close this report.

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

* [Bug c++/101287] Implicit template specialization redefines member function but compiles
  2021-07-01 20:34 [Bug c++/101287] New: Implicite template specialization redefines member function but compiles eligorkadaf at gmail dot com
                   ` (2 preceding siblings ...)
  2021-07-04 19:10 ` eligorkadaf at gmail dot com
@ 2021-07-04 19:11 ` eligorkadaf at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: eligorkadaf at gmail dot com @ 2021-07-04 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

Eligor Kadaf <eligorkadaf at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Eligor Kadaf <eligorkadaf at gmail dot com> ---
I dind't know I have to add a comment to close bug

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

end of thread, other threads:[~2021-07-04 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 20:34 [Bug c++/101287] New: Implicite template specialization redefines member function but compiles eligorkadaf at gmail dot com
2021-07-01 20:35 ` [Bug c++/101287] " redi at gcc dot gnu.org
2021-07-01 20:42 ` [Bug c++/101287] Implicit " eligorkadaf at gmail dot com
2021-07-04 19:10 ` eligorkadaf at gmail dot com
2021-07-04 19:11 ` eligorkadaf at gmail dot com

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).