This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make -Wformat-nonliteral work with gcc


*** TEST RESULTS FOR COMMIT f1628857d783fee0171f16f1bad0b7816460dec5 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: f1628857d783fee0171f16f1bad0b7816460dec5

Make -Wformat-nonliteral work with gcc

After looking into why the build failed for Simon but not for me, we
found that the underlying cause was due to how gcc treats
-Wformat-nonliteral.  gcc requires -Wformat to be given first; but
warning.m4 was not doing this, so -Wformat-nonliteral was not being
used.

This patch changes warning.m4 to account gcc's requirement.

This then showed that the target-float.c build change in the earlier
Makefile patch was also incorrect.  Simon didn't see this in his
build, but gcc now points it out.  So, this patch fixes this problem
as well.

2018-09-05  Tom Tromey  <tom@tromey.com>

	* warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
	-Wformat-nonliteral.
	* target-float.c (host_float_ops<T>::to_string)
	(host_float_ops<T>::from_string): Use
	DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
	* configure: Rebuild.

gdb/gdbserver/ChangeLog
2018-09-05  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]