From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: Fix compilation errors in a testdir created with --with-c++-tests
Date: Sat, 08 Feb 2020 17:40:22 +0100 [thread overview]
Message-ID: <10908736.PXbBvi3vnf@omega> (raw)
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 <bruno@clisp.org>
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
reply other threads:[~2020-02-08 16:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10908736.PXbBvi3vnf@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).