[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] specify void prototype for functions with no parameters

From: Khem Raj
Subject: Re: [PATCH] specify void prototype for functions with no parameters
Date: Wed, 17 Aug 2022 23:58:59 -0700

On Wed, Aug 17, 2022 at 4:32 PM Paul Eggert <> 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() {}
1 error generated.

The code that was tripping came from


Thats what this patch is trying to fix.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]