mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
* typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions. Tweak an error message. * c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated. * c-c++-common/gomp/atomic-13.c: Likewise. * c-c++-common/gomp/atomic-14.c: Likewise. * g++.dg/cpp1y/lambda-init11.C: Remove invalid code. * g++.dg/cpp1z/bool-increment1.C: New test. * c-c++-common/pr60439.c: Add dg-warning. * g++.dg/expr/bitfield4.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/expr/lval4.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. * g++.dg/expr/bitfield3.C: Adjust dg-error. * g++.dg/other/error18.C: Likewise. * g++.dg/gomp/atomic-14.C: Likewise. libgomp/ * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated. libstdc++-v3/ * testsuite/23_containers/vector/debug/insert6_neg.cc: Use -Wno-deprecated. From-SVN: r240141
20 lines
247 B
C
20 lines
247 B
C
// PR c++/61402
|
|
// { dg-do run { target c++14 } }
|
|
|
|
extern "C" void abort();
|
|
|
|
template<typename T>
|
|
void foo(T t) {
|
|
auto test = [ i = ++t ](T v) {
|
|
if (i != v)
|
|
abort();
|
|
};
|
|
test(t);
|
|
}
|
|
|
|
int main(){
|
|
foo(3.14f);
|
|
foo(0);
|
|
foo('a');
|
|
}
|