[Top][All Lists]

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

Re: [Lynx-dev] autotools vs. prototypes

From: Mouse
Subject: Re: [Lynx-dev] autotools vs. prototypes
Date: Thu, 27 Aug 2020 20:08:45 -0400 (EDT)

>> It turns out that you simply CANNOT [make
>> -Werror=implicit-function-declaration the default].

I don't see why not.

>> Almost all GNU autoconf snippets make use of the fact that implicit
>> definitions, even with bogus prototypes, resolve at link time, to
>> detect functions.

Then they are broken and need to be rendered *obviously* broken, so
they can be found and fixed.  Hiding such bugs serves nobody but lazy
software authors/maintainers.

Your exmaple, though, is not the example you seem to think it is:

> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char opendir ();
> | int
> | main ()
> | {
> | return opendir ();
> |   ;
> |   return 0;
> | }

There is no implicit function declaration there.  What is there is an
EXplicit function declaration with no prototype.  That is arguably a
bug too, but to the extent that it is, it is a different one, and
-Werror=implicit-function-declaration should not trip for it.

>> tl;dr: You cannot default to -Werror=implicit-function-declaration
>> *at all* or the usual ./configure; make; sudo make install trifecta
>> will break EVERYWHERE,

That's a feature, not a bug.

Rant ON.

./configure is a broken paradigm and tests that depend on implicit
function declarations, except to test for implicit function
declarations (and why would anyone do that??), are even more broken.
(And, sudo??  Don't even get me started.)

Rant OFF.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

reply via email to

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