From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4075 invoked by alias); 1 Sep 2003 02:10:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4068 invoked by uid 48); 1 Sep 2003 02:10:19 -0000 Date: Mon, 01 Sep 2003 02:10:00 -0000 From: "adah at netstd dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20030901021014.12120.adah@netstd.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12120] New: One specialization form not allowed in GCC 3.x (C++ 98: 14.7.3.9) X-Bugzilla-Reason: CC X-SW-Source: 2003-09/txt/msg00001.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12120 Summary: One specialization form not allowed in GCC 3.x (C++ 98: 14.7.3.9) Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: adah at netstd dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: minw32 GCC host triplet: minw32 GCC target triplet: minw32 This is a platform-independent bug. I confirmed that it exists at least also in gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5). My gcc configuration options: Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as -- host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls -- enable-languages=c,c++,f77,objc,ada,java --disable-win32-registry --disable- shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x - -enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash- synchronization Thread model: win32 gcc version 3.3.1 (mingw special 20030804-1) According to C++ standard 14.7.3.9, specializations in the forms "namespace xxx { template<> class yyy ... }" and "template<> class xxx::yyy ..." are both allowed. Apparently GCC only accepts the former form. The latter form will trigger an error like "specializing `struct __gnu_cxx::hash' in different namespace". Some examples are given in http://gcc.gnu.org/ml/gcc/2003-08/msg01780.html