public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113375] New: GCC accepts invalid program involving template keyword when used without a template arg list
@ 2024-01-13 12:40 jlame646 at gmail dot com
  2024-01-13 23:25 ` [Bug c++/113375] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jlame646 at gmail dot com @ 2024-01-13 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113375
           Summary: GCC accepts invalid program involving template keyword
                    when used without a template arg list
           Product: gcc
           Version: 14.0
            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(as per [temp.name#6]) compiles with gcc and
clang. https://godbolt.org/z/Yrj94haa4

```
template<typename T>
struct C
{
     template<typename U> void func(U)
     {

     }
};
int main()
{
    C<int> c;  
    c.template func(5); //this is invalid as per current wording gcc and clang
accepts but msvc rejects     
    //c.template func<>(5); //valid as per current wording. All compilers
accepts this
}

```

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

* [Bug c++/113375] GCC accepts invalid program involving template keyword when used without a template arg list
  2024-01-13 12:40 [Bug c++/113375] New: GCC accepts invalid program involving template keyword when used without a template arg list jlame646 at gmail dot com
@ 2024-01-13 23:25 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 23:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 55588.

*** This bug has been marked as a duplicate of bug 55588 ***

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

end of thread, other threads:[~2024-01-13 23:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13 12:40 [Bug c++/113375] New: GCC accepts invalid program involving template keyword when used without a template arg list jlame646 at gmail dot com
2024-01-13 23:25 ` [Bug c++/113375] " 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).