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: "joseph.h.garvin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 16:45:21 +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
--- Comment #2 from Joseph Garvin <joseph.h.garvin at gmail dot com> 2012-02-20 16:45:21 UTC ---
#include <cstddef>
template<std::size_t x>
struct test {
static const std::size_t a_
= x ? 10 / x : 10;
};
I just forgot to copy and paste the include. My command line is just "g++
alignptrtest.cpp"