This is the mail archive of the
mailing list for the GCC project.
Re: [C++ diagnostic Patch] Partially fix c++/58363 and more
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Sep 2013 08:02:59 -0500
- Subject: Re: [C++ diagnostic Patch] Partially fix c++/58363 and more
- Authentication-results: sourceware.org; auth=none
- References: <522CDD90 dot 9030708 at oracle dot com>
On Sun, Sep 8, 2013 at 3:26 PM, Paolo Carlini <firstname.lastname@example.org> wrote:
> Hi all, Gaby,
> I was having a look to c++/58363 and besides the main issue, that is we
> probably want to help the user and tell him/her something about destructors,
> etc, I noticed that we aren't able to pretty print the pseudo destructor
> expression at issue:
> cannot convert ‘f.#‘var_decl’ not supported by dump_type#<type error>::~’
> (type ‘void’) to type ‘int’
> Weird. Thus I went to cp-tree.def and found the very clear comment:
> /* A pseudo-destructor, of the form "OBJECT.~DESTRUCTOR" or
> "OBJECT.SCOPE::~DESTRUCTOR. The first operand is the OBJECT. The
> second operand (if non-NULL) is the SCOPE. The third operand is
> the TYPE node corresponding to the DESTRUCTOR.
> which in fact is inconsistent with the code in error.c:dump_expr. As regards
> cxx-pretty-print.c, the code in postfix_expression seems largely Ok (that
> confirmed my analysis), only I don't think the case of NULL second operand
> is handled correctly. What do you think about the below? Certainly passes
> the testsuite and the pretty printing for 58363 is Ok.
Looks good. OK to commit.
I have been hoping that we would have ditched dump_expr and consorts, in
favor of the C++ specific pretty printers, but now…