From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17819 invoked by alias); 25 Sep 2017 16:43:54 -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 17688 invoked by uid 89); 25 Sep 2017 16:43:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=Blvd, inappropriate, Alto, park X-HELO: resqmta-po-01v.sys.comcast.net Received: from resqmta-po-01v.sys.comcast.net (HELO resqmta-po-01v.sys.comcast.net) (96.114.154.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Sep 2017 16:43:52 +0000 Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-01v.sys.comcast.net with ESMTP id wWTodrk5gRlXAwWU3dzAJJ; Mon, 25 Sep 2017 16:43:51 +0000 Received: from vm-fedora21.eagercon.com ([76.21.114.27]) by resomta-po-09v.sys.comcast.net with SMTP id wWU1dN1W90g2WwWU2dq3Wo; Mon, 25 Sep 2017 16:43:51 +0000 Subject: Re: [pushed] microblaze-tdep: Add ATTRIBUTE_PRINTF to microblaze_debug To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <1505995878-10687-1-git-send-email-simon.marchi@ericsson.com> <078ea0b6-71aa-f74d-33fc-859322d4668a@eagerm.com> <441bab33-67b9-be36-e4b7-c22e6936a7bf@redhat.com> From: Michael Eager Message-ID: Date: Mon, 25 Sep 2017 16:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <441bab33-67b9-be36-e4b7-c22e6936a7bf@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfGVsznR3LD9iEDhwU4QEcd/9xfENvbymwwdUfpJwcI0cADNf8Q+qvypcZtDG15+Y2xn9j7KP/jG63hjYpC79aeI2wm3zqsxQYnhbk2df+wpza8ZYY0Yx IVnKlq8FrKpFSkmtJKeNEamE+UY5DfdtSee2uXfixFhn2xPwXUEdB3kEUCynKmF0DqwFLpu30Isx+8VGurZSqATqhf6yTqGjmIDvCJFraGJZaql+t3QtJ1Mp b6rcVcxD0jUui7zJxu4r5Q== X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00757.txt.bz2 On 09/25/2017 09:06 AM, Pedro Alves wrote: >> but the better fix >> seems to me to >> be to turn off the obviously inappropriate -Wformat-nonliteral option in >> microblaze_debug() using >> #pragma GCC diagnostic ignored "-Wformat-nonliteral" > That doesn't make sense to me. The argument passed to vprintf_unformatted in microblaze_debug is not a string literal. The diagnostic message is correct. If you don't want the diagnostic, turning it off seems correct. This is somewhat moot. All uses of microblaze_debug use literal string formats, so adding ATTRIBUTE_PRINTF is OK. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077