Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/Wint-in-bool-context-1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/79184 // { dg-do compile } // { dg-options "-Wint-in-bool-context" } enum { E = 2 }; template <bool> void f(int) { } template <int> void f() {} int main () { f<1 * 1>(); // { dg-bogus "in boolean context" } f<1 << 1>(); // { dg-bogus "in boolean context" } f<1 ? 3 : 2>(); // { dg-bogus "in boolean context" } f<E>(); // { dg-bogus "in boolean context" } }