From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13484 invoked by alias); 24 Feb 2005 19:33:23 -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 13477 invoked by uid 48); 24 Feb 2005 19:33:21 -0000 Date: Thu, 24 Feb 2005 23:45:00 -0000 Message-ID: <20050224193321.13476.qmail@sourceware.org> From: "jody-atd-030903 at atdesk dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050221191203.20123.yanliu@ca.ibm.com> References: <20050221191203.20123.yanliu@ca.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20123] mangled name of typeid doesn't encode cv-qualifer. X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg03030.txt.bz2 List-Id: ------- Additional Comments From jody-atd-030903 at atdesk dot com 2005-02-24 19:33 ------- I am not on the gcc team, so feel free to take this with some reservation. According to 5.2.8.5, the top-level cv-qualifier are stripped when calling typeid(). According to 3.9.3.[2,5], cv-qualifiers applied to array types apply to the array elements, not to the array. Thus, I think the name you see is correct. In your example, you should be able to see typeid() doing the right thing (and see that the top-level cv-qualifers are being stripped) with... int x[10]; assert(typeid(::v5) == typeid(int[10])); assert(typeid(::v5) == typeid(x)); assert(strcmp(typeid(::v5).name(), typeid(x).name()) == 0); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20123