[Bug c++/79184] [7 Regression] -Wint-in-bool-context triggered erroneously in template parameter

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 9 20:12:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79184

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Extended testcase:

enum { E = 2 };
template <bool> void f(int) {}
template <int> void f() {}

int
main ()
{
  f<1 * 1>();
  f<1 << 1>();
  f<1 ? 3 : 2>();
  f<E>();

  f<1 * 1>(0);
  f<1 << 1>(0);
  f<1 ? 3 : 2>(0);
  f<E>(0);
}


More information about the Gcc-bugs mailing list