From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20196 invoked by alias); 1 Aug 2003 16:08:13 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20093 invoked from network); 1 Aug 2003 16:07:33 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 1 Aug 2003 16:07:33 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 652C12B7F; Fri, 1 Aug 2003 12:07:26 -0400 (EDT) Message-ID: <3F2A903E.9000908@redhat.com> Date: Fri, 01 Aug 2003 16:08:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton Cc: gdb Subject: Re: -Wformat References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00005.txt.bz2 > I just downloaded mainline GDB for the first time in far too long, and > the recent -Wformat-nonliteral change breaks -Werror for me (compiling > with GCC 3.2.3). I'll include the stderr output of 'make -k' from > within gdb/ after my signature; I haven't investigated them > thoroughly, but what I've look at makes me think that > -Wformat-nonliteral isn't a good idea. `works for me'. I tested it with: gcc version 2.95.3 20010315 (release) (NetBSD nb3) gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.2) Looking at the first problem: breakpoint.c: In function `insert_breakpoints': breakpoint.c:916: warning: format not a string literal, argument types not checked it revealed this little `gem': static char message1[] = "Error inserting catchpoint %d:\n"; static char message[sizeof (message1) + 30]; ... sprintf (message, message1, b->number); While getting the option working with a current GCC could mean more work, I'm not convinced that it's a bad idea. Andrew