This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] microblaze-tdep: Add ATTRIBUTE_PRINTF to microblaze_debug
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