From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7601 invoked by alias); 6 Oct 2007 07:24:49 -0000 Received: (qmail 7559 invoked by uid 22791); 6 Oct 2007 07:24:39 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (213.8.233.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 Oct 2007 07:24:37 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-247-203.inter.net.il [83.130.247.203]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id HYP94032 (AUTH halo1); Sat, 6 Oct 2007 09:21:48 +0200 (IST) Date: Sat, 06 Oct 2007 07:24:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: muller@ics.u-strasbg.fr, gdb-patches@sourceware.org In-reply-to: <20071005181620.GB3570@adacore.com> (message from Joel Brobecker on Fri, 5 Oct 2007 11:16:20 -0700) Subject: Re: [RFA] Handle GPC specific name for main function Reply-to: Eli Zaretskii References: <001701c805a0$1da99b60$58fcd220$@u-strasbg.fr> <20071005181620.GB3570@adacore.com> X-IsSubscribed: yes 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: 2007-10/txt/msg00082.txt.bz2 > Date: Fri, 5 Oct 2007 11:16:20 -0700 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > This is mostly OK. I feel like I am being a perfectionist on you, > and I apologize, but I think I might have missed something that > feels wrong somehow: You're having to cast your global static const > char into (char *) inside pascal_main_name. I can tell from the code > that everything will be fine, but perhaps we could do better. What > do others think of this cast? > > static const char GPC_MAIN_PROGRAM_NAME_1[] > = "_p__M0_main_program"; > > char * > pascal_main_name (void) > { > [...] > return (char *) GPC_MAIN_PROGRAM_NAME_1[]; > } Yuck! Can't we make pascal_main_name return `const char *'? If not, why not?