From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79077 invoked by alias); 9 Apr 2019 19:24:53 -0000 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 Received: (qmail 78928 invoked by uid 89); 9 Apr 2019 19:24:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:home, H*MI:home X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Apr 2019 19:24:36 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44dy0G3759z1rXgk; Tue, 9 Apr 2019 21:24:30 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44dy0G0Kbhz1qrhC; Tue, 9 Apr 2019 21:24:30 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id WZPauOGaH2V4; Tue, 9 Apr 2019 21:24:29 +0200 (CEST) Received: from igel.home (ppp-46-244-183-240.dynamic.mnet-online.de [46.244.183.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 9 Apr 2019 21:24:29 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 9B0EE2C1B9C; Tue, 9 Apr 2019 21:24:28 +0200 (CEST) From: Andreas Schwab To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix "list" when control characters are seen References: <20190409185432.16985-1-tromey@adacore.com> X-Yow: There's a SALE on STRETCH SOCKS down at the "7-11"!! Date: Tue, 09 Apr 2019 19:24:00 -0000 In-Reply-To: <20190409185432.16985-1-tromey@adacore.com> (Tom Tromey's message of "Tue, 9 Apr 2019 12:54:32 -0600") Message-ID: <87wok36kyb.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-04/txt/msg00160.txt.bz2 On Apr 09 2019, Tom Tromey wrote: > diff --git a/gdb/source.c b/gdb/source.c > index f99215f9810..b61880ab503 100644 > --- a/gdb/source.c > +++ b/gdb/source.c > @@ -1368,7 +1368,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, > char c = *iter; > if (c == '\033' && skip_ansi_escape (iter, &skip_bytes)) > iter += skip_bytes; > - else if (c < 040 && c != '\t') > + else if (c >= 0 && c < 040 && c != '\t') Does this give a warning when char is unsigned? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."