From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30772 invoked by alias); 26 Jan 2007 08:54:15 -0000 Received: (qmail 30759 invoked by uid 22791); 26 Jan 2007 08:54:15 -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; Fri, 26 Jan 2007 08:54:09 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-36-219.inter.net.il [80.230.36.219]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FWT21509 (AUTH halo1); Fri, 26 Jan 2007 10:53:57 +0200 (IST) Date: Fri, 26 Jan 2007 08:54:00 -0000 Message-Id: From: Eli Zaretskii To: Jan Kratochvil CC: gdb-patches@sourceware.org In-reply-to: <20070125113206.GA26448@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Thu, 25 Jan 2007 12:32:06 +0100) Subject: Re: [RFC] Signed/unsigned character arrays are not strings Reply-to: Eli Zaretskii References: <20070125015422.GA19113@host0.dyn.jankratochvil.net> <20070125113206.GA26448@host0.dyn.jankratochvil.net> 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-01/txt/msg00530.txt.bz2 > Date: Thu, 25 Jan 2007 12:32:06 +0100 > From: Jan Kratochvil > Cc: gdb-patches@sourceware.org > > > > I must say I'm uneasy about this. Signedness could be random. What > > will happen on platforms where `char' is unsigned by default? > > I had to find an answer to your interesting comment now myself: > > # The string identification works despite the compiler flags below due to > # gdbtypes.c: > # if (name && strcmp (name, "char") == 0) > # TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN; Thanks, I withdraw my objections. > +@code{-funsigned-char} @value{GCC} options have no effect as @value{GDBN} Please use @value{NGCC}, not @value{GCC}. The former produces output similar to @value{GDBN}, the latter produces a literal lowercase "gcc". > +* Arrays of specifically SIGNED or UNSIGNED CHARs are now printed as arrays > + of numbers. I think "explicitly SIGNED or UNSIGNED..." is a better wording. Thanks.