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

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.


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