RE: automake-1.17 fails with latest Perl (5.41.8) - Possible precedence problem between ! and numeric eq (==)

Igor Todorovski <[email protected]> Thu, 30 Jan 2025 03:33:37 +0000
Newsgroups gmane.comp.sysutils.automake.general
Message-ID <SJ0PR15MB469699F29C512B655258D541EDE92@SJ0PR15MB4696.namprd15.prod.outlook.com>
Thanks, I agree with removing `use warnings FATAL => 'all';` . This will make it somewhat future proof in case new warnings are introduced in new versions of Perl.

When is the next release of automake planned for?

Thanks,
Igor

From: Collin Funk <[email protected]>
Date: Wednesday, January 29, 2025 at 10:16 PM
To: Igor Todorovski <[email protected]>
Cc: [email protected] <[email protected]>
Subject: [EXTERNAL] Re: automake-1.17 fails with latest Perl (5.41.8) - Possible precedence problem between ! and numeric eq (==)
Igor Todorovski <[email protected]> writes:

> This is the relevant code:
>
>   return (!!$val == $neg) ? '##%' : '';

I've attached a patch that fixes this by quoting $val and the '!'
operators.

Maybe Automake shouldn't use:

    use warnings FATAL => 'all';

As was mentioned in the GitHub thread you linked and Perl's
documentation [1].

For cases like this, where the interpreter warns about code it finds
"problematic", but works as the programmer expected.

Collin

[1] https://perldoc.perl.org/warnings#Fatal-Warnings