From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9326 invoked by alias); 5 Aug 2008 19:46:06 -0000 Received: (qmail 9318 invoked by uid 22791); 5 Aug 2008 19:46:05 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Aug 2008 19:45:31 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m75Jj04L031150; Tue, 5 Aug 2008 21:45:00 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m75Jj0qD013712; Tue, 5 Aug 2008 21:45:00 +0200 (CEST) Date: Tue, 05 Aug 2008 19:46:00 -0000 Message-Id: <200808051945.m75Jj0qD013712@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: keiths@redhat.com CC: gdb@sourceware.org In-reply-to: <4898A8D4.2040100@redhat.com> (message from Keith Seitz on Tue, 05 Aug 2008 12:24:04 -0700) Subject: Re: Quoting and the expr parser References: <4898A8D4.2040100@redhat.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00080.txt.bz2 > Date: Tue, 05 Aug 2008 12:24:04 -0700 > From: Keith Seitz > > Hi, > > I have a simple question: > > Why must one type "my_class::'operator+'" instead of simply > "my_class::operator+"? > > *Should* gdb accept the latter; after all, it's not ambiguous (assuming > it's not overloaded). GDB probably should accept that if the selected language is C++. The problem though is that it is actually pretty difficult to make GDB accept that wiouout the additional quotes. Normally a '+' sign isn't allowed in a function name, so you'd have to teach the lexer/parser that it is allowed but only if there the "operator" keyword is used right in front of it. This is a fundamental problem with C++. It is so badly designed that it is almost impossible to write a proper parser for it.