From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8838 invoked by alias); 28 Feb 2007 01:59:17 -0000 Received: (qmail 8828 invoked by uid 22791); 28 Feb 2007 01:59:16 -0000 X-Spam-Check-By: sourceware.org Received: from exprod8og58.obsmtp.com (HELO exprod8og58.obsmtp.com) (64.18.3.98) by sourceware.org (qpsmtpd/0.31) with SMTP; Wed, 28 Feb 2007 01:59:07 +0000 Received: from source ([12.110.134.31]) by exprod8ob58.obsmtp.com ([64.18.7.12]) with SMTP; Tue, 27 Feb 2007 17:58:43 PST Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFC] Signed/unsigned character arrays are not strings Date: Wed, 28 Feb 2007 13:05:00 -0000 Message-ID: <86A3089001A44141B76B882059E7E53B01CCEED7@M31.equallogic.com> From: To: , Cc: , , , , , , X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00292.txt.bz2 > Okay, here's a horrible idea. :) With this patch: >=20 > $ cat chars.c > #include > #include >=20 > typedef char byte_t; >=20 > char *c =3D "chars"; > unsigned char *uc =3D "unsigned chars"; > signed char *sc =3D "signed chars"; > byte_t *b =3D "bytes"; > int8_t *i8 =3D "int8_t's"; > uint8_t *ui8 =3D "uint8_t's"; Neat. I would tweak it a little. People might be using typedefs for character strings that wrap, say, "unsigned char". So if you're going to do a heuristic on the name, treat it as a character string if the name ends in "char" (not=20 necessarily with a preceding space) or "char_t" (because many people use _t as the suffix for typedef names). paul