From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4040 invoked by alias); 7 Sep 2008 15:40:11 -0000 Received: (qmail 4032 invoked by uid 22791); 7 Sep 2008 15:40:10 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.17.161) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 07 Sep 2008 15:39:27 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.1/8.13.1) with ESMTP id m87FdJrO004929 for ; Sun, 7 Sep 2008 15:39:19 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m87FdJQL544874 for ; Sun, 7 Sep 2008 17:39:19 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m87FdJrI030323 for ; Sun, 7 Sep 2008 17:39:19 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m87FdIGS030032; Sun, 7 Sep 2008 17:39:18 +0200 Message-Id: <200809071539.m87FdIGS030032@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sun, 7 Sep 2008 17:38:35 +0200 Subject: Re: [rfc][13/37] Eliminate builtin_type_ macros: Update EVAL_SKIP dummy return type To: brobecker@adacore.com (Joel Brobecker) Date: Sun, 07 Sep 2008 15:40:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20080905225611.GG15267@adacore.com> from "Joel Brobecker" at Sep 05, 2008 03:56:11 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00127.txt.bz2 Joel Brobecker wrote: > On another related note, the "goto nosideret" seems to be misused > to me. We seem to always have: > > goto nosideret; > [...] > > nosideret: > return value_from_longest (builtin_type_long, (LONGEST) 1); > > If we have a value_dummy() function, we can replace all gotos with > a "return value_dummy ()", and get rid of the label. I think it will > be more readable. I tried to have evaluate_subexp return NULL for the EVAL_SKIP case, but that caused frequently-used constructe like this to break: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside); if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS) return arg1; I guess with a bit of effort those could be fixed. Another approach might be to use "allocate_value (builtin_void_type)" as the dummy return value for the EVAL_SKIP case. > This can be done as a followup patch, though... Agreed. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com