This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH] Add quotes to error messages related to Sanitizers.


On 07/10/2017 03:36 AM, Martin Liška wrote:
Hi.

This adds missing quotes to various error messages related to AddressSanitizer.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?

Martin

gcc/ChangeLog:

2017-07-04  Martin Liska  <mliska@suse.cz>

	* opts.c (finish_options): Add quotes to error messages.
	(parse_sanitizer_options): Likewise.

It would make a nice enhancement to -Wformat to have it detect
the missing quotes around the command line options.   It seems
that it should be doable without excessive overhead simply by
scanning the format string for the " -[fmW][a-z]" pattern (or
something like it).  An only slightly more involved/expensive
solution would also compare the rest of the option name against
known options and detect spelling errors in the option names.

This is not an objection to your patch which is a valuable
improvement independent of the enhancement above.

Martin


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