This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52299] GCC warns on compile time division by zero erroneously


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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]