On Wed, Jan 2, 2013 at 11:57 AM, Matthew Szudzik <mszud...@cmu.edu> wrote:

>>How-To-Repeat:
>         Place the program on page 29 of K&R in a file named test.c.  Or
>         alternatively, place the following program in test.c.
>
>                 #include <stdio.h>
>
>                 int getline();
>
>                 main()
>                 {
>                  return getline();
>                 }
>
>                 int getline()
>                 {
>                  return 0;
>                 }
>
>         Then, compile this program using the command
>
>                 gcc -ansi test.c
>
>>Fix:
>         The -ansi option for gcc should hide the declaration of getline
>         in stdio.h.

`gcc -ansi` defines __STRICT_ANSI which could be checked before
setting __POSIX_VISIBLE >=  200809 in <sys/cdefs.h>

Reply via email to