From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31067 invoked by alias); 1 May 2003 14:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31052 invoked by uid 71); 1 May 2003 14:06:01 -0000 Date: Thu, 01 May 2003 14:06:00 -0000 Message-ID: <20030501140601.31051.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Giovanni Bajo" Subject: Re: c++/9634: [3.4 regression] Problems with templates (SFINAE) Reply-To: "Giovanni Bajo" X-SW-Source: 2003-05/txt/msg00029.txt.bz2 List-Id: The following reply was made to PR c++/9634; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , Cc: Subject: Re: c++/9634: [3.4 regression] Problems with templates (SFINAE) Date: Thu, 1 May 2003 15:59:01 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9634 Yes, this is DR224 (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#224), which is in WP status (so the resolution will be adopted in the next version of the standard). Basically, this PR can be sumed up in the following code: -------------------------------------- template struct A { typedef int Bar; template struct N {}; typedef Bar type1; typedef A::Bar type2; typedef A::Bar type3; typedef N type4; typedef A::N type5; typedef A::N type6; }; -------------------------------------- pr9634.cpp:10: error: ISO C++ forbids declaration of `Bar' with no type pr9634.cpp:10: error: expected `;' pr9634.cpp:11: error: ISO C++ forbids declaration of `Bar' with no type pr9634.cpp:11: error: expected `;' pr9634.cpp:14: error: `N' specified as declarator-id pr9634.cpp:14: error: expected `;' pr9634.cpp:15: error: `N' specified as declarator-id pr9634.cpp:15: error: expected `;' The code is legal and should be accepted by GCC. It's rejected from 3.4 (which first disables the implicit typename/template extensions). NOTE for the fixer: I suggest to prepare a testcase using the official examples present in the above link, which tests all the conditions for both success and failure. Giovanni Bajo