bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnu-libiconv] Cannot assume that "gets" is declared


From: Dennis Clarke
Subject: Re: [bug-gnu-libiconv] Cannot assume that "gets" is declared
Date: Mon, 8 Aug 2016 15:44:52 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0a1

On 08/08/2016 01:32 PM, Erik Schnetter wrote:
The file “stdio.in.h” of libiconv contains these lines:

/* It is very rare that the developer ever has full control of stdin,
   so any use of gets warrants an unconditional warning.  Assume it is
   always declared, since it is required by C89.  */
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

This is wrong. “gets” is not part of C11 any more, and hence is not
> declared on some systems when e.g. the gcc flag “-std=c11” is used.
> This breaks my build; I have to manually remove these lines.


We all have .. for a while now.

However why are you using -std=c11 when the project most likely releases code compliant with c99 or even earlier ?

Try -std=c99 or -std=iso9899:1999 however know that neither is really
fully implemented in GCC anyways.

 See https://gcc.gnu.org/onlinedocs/gcc/Standards.html

regardless of pedanty, yes, those lines are annoying.

Dennis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]