Re: v2.35.0 DEVELOPER=1 regression
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2022, 19:51 UTC
- Message-ID
- <xmqqilumayfh.fsf@gitster.g>
- In-Reply-To
- <YeDUA6NhHuCUkqXf@camp.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 12 quoted lines
>> DEVELOPER=1 will now die because its core libraries use C11-specific >> code: >> >> archive.c:337:35: error: '_Generic' is a C11 extension [-Werror,-Wc11-extensions] >> strbuf_addstr(&path_in_archive, basename(path)); >> ^ >> /usr/include/libgen.h:61:21: note: expanded from macro 'basename' >> #define basename(x) __generic(x, const char *, __old_basename, basename)(x) >> ^ >> /usr/include/sys/cdefs.h:325:2: note: expanded from macro '__generic' >> _Generic(expr, t: yes, default: no) >> ^
Wow, that sounds horribly broken.
Show 6 quoted lines
> I think we had this discussion about FreeBSD before and that's why I > specifically dropped that option from the main makefile. We can either > drop that patch, or we can set it to -std=gnu11 and tell folks setting > DEVELOPER to use a system released in the last five years. I think we > can be a little stricter with what we require in the case of DEVELOPER > than we might be otherwise.
But that is not being stricter, but looser, no? I thought that the point of -std=gnu99 was to allow us to use C99 features while catching use of language features newer than that, and use of -std=gnu11 will defeat half the point, wouldn't it?