On Wed, Aug 17, 2022 at 4:32 PM Paul Eggert <egg...@cs.ucla.edu> wrote:
>
> On 8/17/22 16:25, Khem Raj wrote:
> > right and I am not passing -Werror to configure but its newer version
> > of clang ( clang 15) which is turning these warnings into errors
> > by default now.
>
> Wait, so clang 15 by default refuses to compile this C program?
>
> void f() {}

No thats not the case until you add -pedantic-errors to compiler
cmdline, the issue I ran into is with rsync which add -pedantic-errors
option to cflags
during configure and when we use  -pedantic-errors with clang15 then
it marks -Wstrict-prototypes as errors
unlike older versions of clang where this warning was not added to
pedantic warnings list and this program fails to compile

a.c:1:8: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 void f() {}
       ^
        void
1 error generated.

The code that was tripping came from

AC_CHECK_LIB(acl,acl_get_file)

Thats what this patch is trying to fix.

>

Reply via email to