foo.cc: In function ‘int main()’:
foo.cc:10:13: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
10 | gets(a);
| ~~~~^~~
In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/cstdio:42,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ext/string_conversions.h:45,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.h:4154,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/string:54,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/locale_classes.h:40,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/ios_base.h:41,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ios:44,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ostream:40,
from iostream:41:
/nix/glibc-2.40-66-dev/include/stdio.h:667:14: note: declared here
667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:17:20: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
17 | int b[n]={0};
| ^
foo.cc:17:13: note: destination object ‘b.97’ of size 0
17 | int b[n]={0};
| ^
/nix/binutils-2.44/bin/ld: /tmp/ccLSwjjQ.o: in function `main':
foo.cc:(.text.startup+0x27): warning: the `gets' function is dangerous and should not be used.