GNU bug report logs -
#49261
28.0.50; File Locking Breaks Presumptuous Toolchains
Previous Next
Reported by: Mallchad Skeghyeph <ncaprisunfan <at> gmail.com>
Date: Mon, 28 Jun 2021 18:28:02 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 7/14/21 2:42 AM, Andreas Schwab wrote:
> On Jul 13 2021, Paul Eggert wrote:
>
>> However, there is no overflow here:
>>
>> unsigned a = -1, b = INT_MIN, c = LLONG_MAX;
>>
>> and these declarations have well-defined behavior in C,
> This is a bogus argument.
It's not bogus. I quoted the GCC documentation and noted that GCC's
behavior does not match its documentation. At the very least -- even if
you like GCC's behavior, which I don't -- the documentation should match
the behavior.
> assinging a wider constant to a narrow object,
> losing bits, is likely hiding a bug.
If that's what you think -Woverflow should do, then GCC doesn't do that
either. For example:
unsigned char a = -1, b = 255;
This generates no warning with -Woverflow, even though A's
initialization assigns a wider constant to a narrow object, losing bits.
Without looking at GCC's source code, it's not clear what -Woverflow
actually does. It is a bit of a mess. Certainly -Woverflow does not do
what it's documented to do.
This bug report was last modified 3 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.