public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41423]  New: missing warning for an uncallable function template
@ 2009-09-20 21:52 msebor at gmail dot com
  2009-09-20 21:53 ` [Bug c++/41423] " msebor at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: msebor at gmail dot com @ 2009-09-20 21:52 UTC (permalink / raw)
  To: gcc-bugs

There is no way for a program to refer to the template constructor defined
in the class below.  EDG eccp issues a warning to point this out, but gcc
silently accepts the code.  It would be helpful if gcc were enhanced to
issue a similar diagnostic.

$ cat t.cpp && gcc -dumpversion && gcc -W -Wall -Wextra -pedantic -c t.cpp &&
eccp -c -v t.cpp
struct S { template <class> S () { } };
4.4.1
Edison Design Group C/C++ Front End, version 3.10.1 (Apr 22 2008 17:02:08)
Copyright 1988-2007 Edison Design Group, Inc.

"t.cpp", line 1: warning: template parameter "<unnamed>" is not used in
          declaring the parameter types of function template "S::S"
  struct S { template <class> S () { } };
                            ^


-- 
           Summary: missing warning for an uncallable function template
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: msebor at gmail dot com


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


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

* [Bug c++/41423] missing warning for an uncallable function template
  2009-09-20 21:52 [Bug c++/41423] New: missing warning for an uncallable function template msebor at gmail dot com
@ 2009-09-20 21:53 ` msebor at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: msebor at gmail dot com @ 2009-09-20 21:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

msebor at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

end of thread, other threads:[~2009-09-20 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-20 21:52 [Bug c++/41423] New: missing warning for an uncallable function template msebor at gmail dot com
2009-09-20 21:53 ` [Bug c++/41423] " msebor 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).