From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
Part of the attached patch, recently installed into master, w= ould be
automatically reverted the next time we merged from gnulib, since
strftime.c is copied from Gnulib. I'm not getting a warning when
compiling with Clang, so I'm puzzled as to why the patch was needed.
Here's how I build (on Fedora 25):
./configure --enable-gcc-warnings CC=3Dclang
Fedora 25 is running clang version 3.9.1 (tags/RELEASE_391/final).I get this on macOS with -O3 and -enable-gcc-wa= rnings, using Apple's fork of Clang (i.e. the default system compiler).==C2=A0
Background: I would rather avoid the need for this sort of patch, as we
shouldn't have to complicate the code just to pacify a Clang false
alarm. If an older Clang is generating a false alarm, let's just ignore=
the diagnostic. If it's a newer Clang, let's change the options to = Clang
to suppress the diagnostic.
I'd prefer to not suppress the dia= gnostic globally, because these warnings are generally useful in other plac= es.Would you accept introducing pragmas to temporarily disable t= he warnings in Clang (#pragma clang diagnostic push/ignore/pop), with an ex= planation why they are false positives in these cases?=C2=A0