This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/68121] __builtin_constant_p should not warn about integer overflow
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Jul 2017 21:54:16 +0000
- Subject: [Bug c/68121] __builtin_constant_p should not warn about integer overflow
- Auto-submitted: auto-generated
- References: <bug-68121-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68121
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-07-28
CC| |egallager at gcc dot gnu.org,
| |msebor at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed, full warning is:
$ /usr/local/bin/gcc -c -S 68121.c
68121.c:4:33: warning: integer overflow in expression of type ‘int’ results in
‘-294967296’ [-Woverflow]
a = __builtin_constant_p (x + y) ? x : -1,
^
$
(Martin Sebor recently added the part where it calculates the result; cc-ing
him)