From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15463 invoked by alias); 19 May 2003 21:16:59 -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 11857 invoked by uid 71); 19 May 2003 21:16:00 -0000 Date: Mon, 19 May 2003 21:17:00 -0000 Message-ID: <20030519211600.11856.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates Reply-To: Gabriel Dos Reis X-SW-Source: 2003-05/txt/msg02112.txt.bz2 List-Id: The following reply was made to PR c++/10864; it has been noted by GNATS. From: Gabriel Dos Reis To: bangerth@dealii.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates Date: 19 May 2003 23:08:18 +0200 bangerth@dealii.org writes: | g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc | y.cc: In member function `bool less::foo() [with T = | X >, | std::vector > >]': | y.cc:10: instantiated from here | y.cc:5: error: no match for `X >, std::vector > > < X >, std::vector > >' operator | | Now, that's pretty hard to read. What it says is: | no match for `A < B' operator | but the "<" is totally lost in all these template args. | I also always thought that the message was somehow | truncated, since usually in C++ there must be something | after the "operator" :-) I fully agree. I must confess that I have never been sympathetic to the way we handle messages saying "no match for bubble[tangle] operator". Sometime, they just look very strange to read. | I think it would be nice if the message could be changed | to read like | no match for operator< in expression `A < B' | That way it would be simpler to figure out which operator | exactly is missing. I think that is a very good suggestion. -- Gaby