Re: Problems building rsync with Clang 15 beta

"Zack Weinberg" <[email protected]> Thu, 18 Aug 2022 14:09:47 -0400
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
On Thu, Aug 18, 2022, at 12:51 PM, Paul Eggert wrote:
> On 8/18/22 09:38, Khem Raj wrote:
>> I think the autoconf patch should be good on its own merits regardless
>
> It partly depends on how much we care about compatibility. Putting the 
> 'void' in there will break pre-C89 compilers, as well as C++ compilers 
> pretending (badly) to be C compilers. I doubt whether we care about the 
> former any more, but the latter might be an issue.

According to the NEWS file, pre-C89 compilers are officially not supported anymore as of 2.70, and neither is setting CC to a C++ compiler.  Also if I remember correctly, AC_PROG_CC does not enforce either of those rules.  (Maybe it should?  I don't know where to get a K&R-*only* compiler that works on a modern system, to test that with.)

I believe at least some of these code snippets are used with CXX in AC_LANG([C++]) mode, though.  That would be the thing to worry about.

zw