diff mbox series

Undefine ERROR in g++.dg/tree-ssa/copyprop.C

Message ID orlfdph629.fsf@lxoliva.fsfla.org
State New
Headers show
Series Undefine ERROR in g++.dg/tree-ssa/copyprop.C | expand

Commit Message

Alexandre Oliva Dec. 22, 2020, 9:41 p.m. UTC
VxWorks headers define ERROR as a macro, which conflicts with the use
in the test.

Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
Ok to install?


from Jerome Lambourg <lambourg@adacore.com>
for  gcc/testsuite/ChangeLog

	* g++.dg/tree-ssa/copyprop.C: Undefine ERROR if defined.
---
 gcc/testsuite/g++.dg/tree-ssa/copyprop.C |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Mike Stump Dec. 29, 2020, 6:34 p.m. UTC | #1
On Dec 22, 2020, at 1:41 PM, Alexandre Oliva <oliva@adacore.com> wrote:
> 
> VxWorks headers define ERROR as a macro, which conflicts with the use
> in the test.
> 
> Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
> Ok to install?

Ok.
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
index 8c05895e45ec6..bc9167ad1201f 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
@@ -8,6 +8,11 @@ 
 #include <vector>
 #include <iostream>
 #include <cstdlib>
+
+#ifdef ERROR
+#undef ERROR
+#endif
+
 using namespace std;
 template<typename _FIter, typename _Tp> _FIter lower_bound(_FIter, _FIter, _Tp&);
 template<class _Key> struct hash { };