[Top][All Lists]

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

Re: error: jump skips variable initialization

From: Jim Meyering
Subject: Re: error: jump skips variable initialization
Date: Sun, 24 Jun 2018 17:25:32 -0700

On Sun, Jun 24, 2018 at 5:00 PM, Bruno Haible <address@hidden> wrote:
> Hi Jim, Paul,
>> parse-datetime.y: In function 'parse_datetime2':
>> parse-datetime.y:1791:19: error: jump skips variable initialization \
>>   [-Werror=jump-misses-init]

Hi Bruno,

Didn't this warning or one very much like it catch real bugs, e.g.,
where the initialization would be omitted, and the result would be to
use an uninitialized variable somewhere after the jumped-to label?

> Is the point merely "the standard says that a warning is possible, so let's
> implement it"?
> Can someone answer this?
> The next question then is: Why don't we silence this warning in the
> 'manywarnings' module?

If there is clearly no more utility in using this warning for C code,
then we're better off deleting it. Certainly in today's case, there
was no bug.

reply via email to

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