From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28902 invoked by alias); 20 Sep 2009 21:52:38 -0000 Received: (qmail 28871 invoked by uid 48); 20 Sep 2009 21:52:27 -0000 Date: Sun, 20 Sep 2009 21:52:00 -0000 Subject: [Bug c++/41423] New: missing warning for an uncallable function template X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "msebor at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg01953.txt.bz2 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 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 "" is not used in declaring the parameter types of function template "S::S" struct S { template 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