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

Alexandre Oliva oliva@adacore.com
Tue Dec 22 21:41:34 GMT 2020


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(+)

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 { };

-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar


More information about the Gcc-patches mailing list