From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25116 invoked by alias); 4 Apr 2002 03:55:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25100 invoked from network); 4 Apr 2002 03:54:59 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 4 Apr 2002 03:54:59 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id BD54A5EA11; Wed, 3 Apr 2002 22:54:57 -0500 (EST) To: Jim Ingham Cc: gdb-patches@sources.redhat.com Subject: Re: Trivial fix in value_sub References: <775EF184-4760-11D6-A9CC-000393540DDC@apple.com> From: Jim Blandy Date: Wed, 03 Apr 2002 19:55:00 -0000 In-Reply-To: <775EF184-4760-11D6-A9CC-000393540DDC@apple.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00094.txt.bz2 Jim Ingham writes: > So... I don't think you should keep the size at 0. This seems like > gdb is just silently ignoring the " - x" part of what they typed, and > you should always be explicit about what you have done. But if you > think an error is more appropriate, I am fine with that... Oh, no, I didn't mean to suggest that zero was the right size to use; I agree with you completely that that would be pretty confusing. Your story is pretty amazing --- I would never have guessed that people actually *use* the sizeof (struct incomplete) == 1 behavior! I think it is much more common for people to be unaware that the type is incomplete; if this hunch is correct, then the behavior your toolbox folks love will be very confusing. I think an error for arithmetic on any incomplete type other than (void *) is the right thing.