[PATCH] features.h: do not consider _GNU_SOURCE for gets

H.J. Lu hjl.tools@gmail.com
Fri Aug 28 21:55:31 GMT 2026


On Sun, Aug 16, 2026 at 5:05 PM Arsen Arsenović <arsen@aarsen.me> wrote:
>
> Arsen Arsenović <arsen@aarsen.me> writes:
>
> > Currently, -std=c99 -D_GNU_SOURCE and similar lack the 'gets'
> > declaration.
> >
> > This causes, say, programs using the:
> >
> >   extern __typeof__ (gets) function __attribute__ ((__warning__ (...)))
>
> There's a typo there.  That's meant to be:
>
>   extern __typeof__ (gets) gets __attribute__ ((__warning__ (...)))
>
> ... of course.
> --
> Arsen Arsenović

At least, more tests are needed for changed behavior:

1. No gets prototype for ISO C11 and ISO C++14.
2. Warnings of gets usage from compiler before ISO C11 or ISO C++14.

-- 
H.J.


More information about the Libc-alpha mailing list