public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17161] New: failure to diagnose an ill-formed instantiation on a local type
@ 2004-08-24  0:42 sebor at roguewave dot com
  2004-08-24  0:46 ` [Bug c++/17161] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sebor at roguewave dot com @ 2004-08-24  0:42 UTC (permalink / raw)
  To: gcc-bugs

Gcc 3.4 fails to diagnose the following ill-formed program.

$ cat t.cpp && g++ --version && g++ t.cpp -Wextra -W -pedantic
struct S {
    void foo (unsigned long) { }
    template <class T> void foo (T) { }
};

int main ()
{
    enum E { e };

    S ().foo (e);   // local types are not allowed as template arguments
}

g++ (GCC) 3.4.0
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- 
           Summary: failure to diagnose an ill-formed instantiation on a
                    local type
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17161


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

end of thread, other threads:[~2005-02-22  1:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24  0:42 [Bug c++/17161] New: failure to diagnose an ill-formed instantiation on a local type sebor at roguewave dot com
2004-08-24  0:46 ` [Bug c++/17161] " pinskia at gcc dot gnu dot org
2004-08-24  0:59 ` pinskia at gcc dot gnu dot org
2004-08-24  3:02 ` bangerth at dealii dot org
2005-02-22 10:25 ` pinskia at gcc dot gnu dot 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).