This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52299] GCC warns on compile time division by zero erroneously
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 12:13:03 +0000
- Subject: [Bug c++/52299] GCC warns on compile time division by zero erroneously
- Auto-submitted: auto-generated
- References: <bug-52299-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52299
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-02-20
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-20 12:13:03 UTC ---
Your testcase does not compile. Using
template<unsigned int x>
struct test {
static const unsigned int a_
= x ? 10 / x : 10;
};
instead does not reproduce the warning (not even with -Wall).
Please provide preprocessed source and the command-line you are using
to reproduce the issue.