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
Message #305 received at 49261 <at> debbugs.gnu.org (full text, mbox):
On 7/12/21 10:54 AM, Eli Zaretskii wrote:
> Then what is the -Woverflow option for? Can you show an example of
> code which -Woverflow would flag that doesn't produce a bogus warning?
Sure: the GCC documentation says -Woverflow is supposed to warn about
"compile-time overflow in constant expressions". So GCC should (and
does) warn about this top-level declaration:
int x = INT_MAX + 1;
However, there is no overflow here:
unsigned a = -1, b = INT_MIN, c = LLONG_MAX;
and these declarations have well-defined behavior in C, so -Woverflow
should not issue warnings for them even though they are unsigned
conversions that change numeric values.
It might be useful to some programmers to generate warnings about these
unsigned conversions, but this should be a separate -W option not
-Woverflow. There's no overflow here.
This bug report was last modified 3 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.