From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14893 invoked by alias); 15 Oct 2014 21:46:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 14882 invoked by uid 89); 15 Oct 2014 21:46:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Oct 2014 21:46:27 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XeWOk-0003QA-N3 from joseph_myers@mentor.com ; Wed, 15 Oct 2014 14:46:22 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.181.6; Wed, 15 Oct 2014 22:46:21 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1XeWOi-0002Lb-EE; Wed, 15 Oct 2014 21:46:20 +0000 Date: Wed, 15 Oct 2014 21:48:00 -0000 From: "Joseph S. Myers" To: Marek Polacek CC: GCC Patches Subject: Re: [C PATCH] Clamp down "incomplete type" error (PR c/63543) In-Reply-To: <20141015172244.GE10501@redhat.com> Message-ID: References: <20141015172244.GE10501@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-10/txt/msg01439.txt.bz2 On Wed, 15 Oct 2014, Marek Polacek wrote: > We've got a complaint that the "dereferencing pointer to incomplete > type" error is printed for all occurrences of the incomplete type, > which is too verbose. Also it'd be nicer to print the type as well. > This patch fixes this; if we find an incomplete type, mark it with error > node, then we don't print the error message more than once. I don't like this approach of modifying the type; type nodes are shared objects and this could affect all sorts of other logic subsequently working with the type. I think there should be some sort of annotation of the type (either in the type itself, or on the side) that *only* means an error has been given for the type being incomplete, rather than inserting error_mark_node into the type. -- Joseph S. Myers joseph@codesourcery.com