[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix compilation errors in a testdir created with --with-c++-tests
From: |
Bruno Haible |
Subject: |
Fix compilation errors in a testdir created with --with-c++-tests |
Date: |
Sat, 08 Feb 2020 17:40:22 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) |
In a testdir created through
./gnulib-tool --create-testdir --dir=... --single-configure --with-c++-tests
lchmod fchmodat
I'm getting compilation errors, such as:
In file included from test-string-c++.cc:22:
../gllib/string.h:707: error: type of 'memrchr' is unknown
../gllib/string.h:707: error: invalid type in declaration before ';' token
../gllib/string.h:707: error: 'int memrchr' redeclared as different kind of
symbol
/usr/include/string.h:114: error: previous declaration of 'const void*
memrchr(const void*, int, size_t)'
This patch fixes it, unfortunately at the cost of disabling useful warnings.
2020-02-08 Bruno Haible <address@hidden>
Fix compilation errors in a testdir created with --with-c++-tests.
* lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
since it does not work any more with g++ >= 4.4.
diff --git a/lib/c++defs.h b/lib/c++defs.h
index 5d5da71..402cae4 100644
--- a/lib/c++defs.h
+++ b/lib/c++defs.h
@@ -301,9 +301,6 @@
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
"The symbol ::" #func " refers to the system
function. " \
"Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-# define
_GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
- extern __typeof__ (func) func
# else
# define
_GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
_GL_EXTERN_C int _gl_cxxalias_dummy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix compilation errors in a testdir created with --with-c++-tests,
Bruno Haible <=