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

--- Comment #1 from Tom Tromey <tromey at gcc dot gnu.org> ---
Also, note what happens if one changes the body of the function:

extern void *allocate (int);

#define my_alloc(X) allocate (X)

int *alloc_int(void)
{
  return my_alloc(sizeof (int));
}


barimba. gcc --syntax-only -Wc++-compat r.c
r.c: In function ‘alloc_int’:
r.c:7:3: warning: request for implicit conversion from ‘void *’ to ‘int *’ not
permitted in C++ [-Wc++-compat]
   return my_alloc(sizeof (int));
   ^


Now there's no mention of the macro at all.

Reply via email to