From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12691 invoked by alias); 20 Jun 2012 14:56:07 -0000 Received: (qmail 12673 invoked by uid 22791); 20 Jun 2012 14:56:06 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jun 2012 14:55:54 +0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/14186] const volatile is ignored for TYPE_INSTANCE Date: Wed, 20 Jun 2012 14:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00263.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14186 --- Comment #2 from Tom Tromey 2012-06-20 14:55:38 UTC --- Created attachment 6461 --> http://sourceware.org/bugzilla/attachment.cgi?id=6461 start of a patch Here's the start of a patch. It has some unnecessary stuff in it, since I was hacking around a bit. But some parts should be ok, like the c-exp.y change. The TYPE_INSTANCE code seems very suspect to me. The parser production just uses 'exp' -- but this means all kinds of weird things can be parsed here. (On further reflection I wish I hadn't allowed this extension...) Also the code in eval.c does not use cleanups, so it can leak memory on errors. The fundamental problem I hit is that rank_one_type does not consider cv-qualifiers. So, even after getting the qualifiers all the way through, we still get the wrong answer; and I didn't want to try fixing this problem yet. The cv-qualifier problem could be hacked around in compare_parameters, but that seemed too hackish for me. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.