[Bug c++/113706] c-c++-common/pr103798-2.c FAILs as C++

dragon-archer at outlook dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113706

Zhongteng Gui <dragon-archer at outlook dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dragon-archer at outlook dot com

--- Comment #15 from Zhongteng Gui <dragon-archer at outlook dot com> ---
Hi, mingw-w64 recently implemented to provide 2 versions of memchr for C++
(argument and return type are both const void* or both void*), and we found
that GCC 7-14 warns about `extern "C" const void* memchr(const void*, int,
size_t);`, which seemes to be the same issue here.

warning: declaration of 'const void* memchr(const void*, int, size_t)'
conflicts with built-in declaration 'void* memchr(const void*, int, long
unsigned int)' [-Wbuiltin-declaration-mismatch]

I'd appreciate if you could backport this patch to GCC 13.5 and GCC 14.5,
thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.