Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/Wint-in-bool-context-1.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +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" } }