https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67220

--- Comment #5 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
FYI the C++ FE behaves differently:

cat x.cc
typedef __SIZE_TYPE__ size_t;
extern "C" void *memset(void *s, int c, size_t n)
  __attribute__ ((visibility ("hidden")));

void
foo1 (void *s, size_t n)
{
  memset (s, '\0', n);
}

void
foo2 (void *s, int c, size_t n)
{
  memset (s, c, n);
}

gcc -Wall -O2 -fPIC -S x.cc
x.cc:2:18: warning: 'void* memset(void*, int, size_t)': visibility attribute
ignored because it conflicts with previous declaration [-Wattributes]
 extern "C" void *memset(void *s, int c, size_t n)
                  ^~~~~~
<built-in>: note: previous declaration of 'void* memset(void*, int, size_t)'

Reply via email to