public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107126] New: GCC accepts invalid out of class definition for destructor with C++17
@ 2022-10-02 19:11 jlame646 at gmail dot com
  2022-10-02 19:41 ` [Bug c++/107126] " jakub at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jlame646 at gmail dot com @ 2022-10-02 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107126
           Summary: GCC accepts invalid out of class definition for
                    destructor with C++17
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

The following invalid program is accepted by gcc with C++17. Demo:
https://godbolt.org/z/TYjEzss6q

```
template<typename T>
struct C
{
    ~C();
};
template<typename T>
C<T>::~C<T>()      //this is accepted by gcc with c++17
{

}
int main()
{
    C<int> c;;
}
```

This has been discussed here:
https://stackoverflow.com/questions/73928601/clang-accepts-out-of-class-destructor-definition-while-gcc-does-not

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

end of thread, other threads:[~2024-02-10 13:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-02 19:11 [Bug c++/107126] New: GCC accepts invalid out of class definition for destructor with C++17 jlame646 at gmail dot com
2022-10-02 19:41 ` [Bug c++/107126] " jakub at gcc dot gnu.org
2022-10-02 20:10 ` jlame646 at gmail dot com
2022-10-02 20:34 ` jlame646 at gmail dot com
2022-10-02 20:49 ` jakub at gcc dot gnu.org
2022-10-03  6:14 ` jlame646 at gmail dot com
2022-10-03  6:40 ` jlame646 at gmail dot com
2022-10-03  9:51 ` redi at gcc dot gnu.org
2022-10-03 14:29 ` [Bug c++/107126] -Wc++20-compat should complain about template-id in out of class definition for destructor jason at gcc dot gnu.org
2024-02-01 23:36 ` mpolacek at gcc dot gnu.org
2024-02-10 13:38 ` cvs-commit at gcc dot gnu.org
2024-02-10 13:45 ` mpolacek 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).