From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16759 invoked by alias); 15 Oct 2014 21:48:26 -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 16744 invoked by uid 89); 15 Oct 2014 21:48:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 15 Oct 2014 21:48:23 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9FLmKbJ018975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Oct 2014 17:48:20 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9FLmKYP027100; Wed, 15 Oct 2014 17:48:20 -0400 Message-ID: <543EEBA4.2030907@redhat.com> Date: Wed, 15 Oct 2014 21:53:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: "Joseph S. Myers" , Marek Polacek CC: GCC Patches Subject: Re: [C PATCH] Clamp down "incomplete type" error (PR c/63543) References: <20141015172244.GE10501@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01440.txt.bz2 On 10/15/14 15:46, Joseph S. Myers wrote: > 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. Isn't slamming error_mark_node well established at this point? I fact I recall seeing it documented to be used in this kind of way to prevent future errors. jeff