This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test


Hi Jakub,


-extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t
__size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
__attribute__ ((__warn_unused_result__));

+extern size_t __malloc (void *__restrict __ptr, size_t __ptrlen, size_t
__size, size_t __n, FILE *__restrict __stream) __asm__ ("") __attribute__
((__warn_unused_result__));

The __asm__ ("") on both decls is very weird.  The original had
"" "__fread_chk" aka "__fread_chk" instead.

What does that do ? I could not find a reference to it in the documentation.

But malloc really has also different arguments...

True - thinking about it afterwards it occurred to me that renaming the function to just "fread" would be a lot better ...

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]