[Issue 24297] ImportC incompatible with glibc _FORTIFY_SOURCE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 24 09:45:33 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24297

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Here is the preprocessed code:

# 194 "/usr/include/bits/stdio2.h" 3 4
extern 
# 194 "/usr/include/bits/stdio2.h"
inline 
# 194 "/usr/include/bits/stdio2.h" 3 4
__attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__))
__attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__))
__attribute__ ((__access__ (__write_only__, 1, 2))) char *
fgets (char * __s, int __n, FILE * __stream)
{
  size_t sz = __builtin_object_size (__s, 1 > 1);
  if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) ||
(((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) &&
(__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) /
((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof
(char)))))))
    return __fgets_alias (__s, __n, __stream);
  if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n)
&& (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) /
(sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
    return __fgets_chk_warn (__s, sz, __n, __stream);
  return __fgets_chk (__s, sz, __n, __stream);
}

--


More information about the Digitalmars-d-bugs mailing list