This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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] | |
Susukita Ryutaro <susukita@postman.riken.go.jp> writes:
> I compiled the following test.c on Redhat 9.
>
> #include <unistd.h>
Read the FAQ:
3.11. I get some errors with `gcc -ansi'. Isn't glibc ANSI compatible?
> int main(int argc, char **argv){
> getopt(argc, argv, "a");
> return 0;
> }
>
> $ gcc -Wall test.c
> $ gcc -Wall -ansi test.c
> test_getopt.c: In function `main':
> test_getopt.c:4: warning: implicit declaration of function `getopt'
>
> Why the declaration of getopt is not effective when I compile with
> -ansi? Could I use getopt with -ansi?
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |