clang version 15.0.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 clang-15: error: no input files /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lsendfile: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -liconv: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lintl: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lintl: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:8:9: error: call to undeclared function 'arc4random'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= arc4random(); ^ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lintl: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:6:7: warning: unused variable 'b' [-Wunused-variable] bfd *b = 0; ^ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lintl: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:5:2: error: array size is negative STATIC_ASSERT(2 == sizeof(foo)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./static_assert.h:1:50: note: expanded from macro 'STATIC_ASSERT' #define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) ^~~~~~~~~~~~~ try.c:5:2: error: array size is negative STATIC_ASSERT(2 == sizeof(foo)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./static_assert.h:1:50: note: expanded from macro 'STATIC_ASSERT' #define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) ^~~~~~~~~~~~~ try.c:5:2: error: array size is negative STATIC_ASSERT(4 == sizeof(foo)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./static_assert.h:1:50: note: expanded from macro 'STATIC_ASSERT' #define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) ^~~~~~~~~~~~~ try.c:5:2: error: array size is negative STATIC_ASSERT(2 == sizeof(foo)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./static_assert.h:1:50: note: expanded from macro 'STATIC_ASSERT' #define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) ^~~~~~~~~~~~~ try.c:5:2: error: array size is negative STATIC_ASSERT(4 == sizeof(foo)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./static_assert.h:1:50: note: expanded from macro 'STATIC_ASSERT' #define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) ^~~~~~~~~~~~~ try.c:2:10: fatal error: 'stropts.h' file not found #include ^~~~~~~~~~~ try.c:9:13: error: no member named 'd_namlen' in 'struct dirent'; did you mean 'd_reclen'? dir_entry.d_namlen |= 1; ^~~~~~~~ d_reclen /usr/include/bits/dirent.h:31:24: note: 'd_reclen' declared here unsigned short int d_reclen; ^ try.c:4:9: warning: cast to smaller integer type 'int' from 'int *' [-Wpointer-to-int-cast] return (int) &end >> 12; ^~~~~~~~~~ try.c:4:9: warning: cast to smaller integer type 'int' from 'int *' [-Wpointer-to-int-cast] return (int) &etext >> 12; ^~~~~~~~~~~~ :1:10: fatal error: 'winsock2.h' file not found #include ^~~~~~~~~~~~ :1:10: fatal error: 'ws2tcpip.h' file not found #include ^~~~~~~~~~~~ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lWs2_32: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:11:14: warning: variable 'ret' set but not used [-Wunused-but-set-variable] static int ret; ^ try.c:1:10: fatal error: 'invent.h' file not found #include ^~~~~~~~~~ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lWs2_32: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:8:17: error: call to undeclared function 'getprogname'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] printf("%s\n", getprogname()); ^ try.c:8:17: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] printf("%s\n", getprogname()); ~~ ^~~~~~~~~~~~~ %d try.c:16:12: error: variable has incomplete type 'struct tm' struct tm foo; ^ try.c:16:9: note: forward declaration of 'struct tm' struct tm foo; ^ try.c:26:17: warning: self-comparison always evaluates to true [-Wtautological-compare] if (bar.tv_sec == bar.tv_sec) ^ try.c:16:12: error: variable has incomplete type 'struct tm' struct tm foo; ^ try.c:16:9: note: forward declaration of 'struct tm' struct tm foo; ^ try.c:21:18: error: variable has incomplete type 'struct timezone' struct timezone tzp; ^ try.c:21:9: note: forward declaration of 'struct timezone' struct timezone tzp; ^ try.c:26:17: warning: self-comparison always evaluates to true [-Wtautological-compare] if (bar.tv_sec == bar.tv_sec) ^ 1 warning and 2 errors generated. try.c:23:17: warning: self-comparison always evaluates to true [-Wtautological-compare] if (foo.tm_sec == foo.tm_sec) ^ try.c:26:17: warning: self-comparison always evaluates to true [-Wtautological-compare] if (bar.tv_sec == bar.tv_sec) ^ try.c:21:18: warning: unused variable 'tzp' [-Wunused-variable] struct timezone tzp; ^ 3 warnings generated. try.c:10:2: warning: variable 'ret' is uninitialized when used here [-Wuninitialized] ret |= getrlimit(RLIMIT_CORE, &lim); ^~~ try.c:9:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 try.c:10:9: warning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations] ret |= ftime(&t); ^ /usr/include/sys/timeb.h:31:3: note: 'ftime' has been explicitly marked deprecated here __attribute_deprecated_msg__ ("Use gettimeofday or clock_gettime instead"); ^ /usr/include/sys/cdefs.h:350:19: note: expanded from macro '__attribute_deprecated_msg__' __attribute__ ((__deprecated__ (msg))) ^ try.c:2:10: fatal error: 'sys/event.h' file not found #include ^~~~~~~~~~~~~ :1:10: fatal error: 'libcharset.h' file not found #include ^~~~~~~~~~~~~~ try.c:8:10: error: call to undeclared function 'locale_charset'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= *locale_charset(); ^ try.c:8:9: error: indirection requires pointer operand ('int' invalid) ret |= *locale_charset(); ^~~~~~~~~~~~~~~~~ 2 errors generated. try.c:7:9: error: call to undeclared library function 'mempcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] return mempcpy(q + 4, r + 2, n - 1); ^ try.c:7:9: note: include the header or explicitly provide a declaration for 'mempcpy' try.c:7:6: error: call to undeclared function 'memrchr'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] p = memrchr(s, 'x', n); ^ try.c:7:6: note: did you mean 'memchr'? /usr/include/string.h:107:14: note: 'memchr' declared here extern void *memchr (const void *__s, int __c, size_t __n) ^ try.c:7:4: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion] p = memrchr(s, 'x', n); ^ ~~~~~~~~~~~~~~~~~~ 2 errors generated. :1:10: fatal error: 'mswsock.h' file not found #include ^~~~~~~~~~~ open3.c:9:14: warning: if statement has empty body [-Wempty-body] if(O_RDONLY); ^ open3.c:9:14: note: put the semicolon on a separate line to silence this warning try.c:13:9: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= pipe2(fds, O_CLOEXEC | O_NONBLOCK); ^ try.c:13:9: note: did you mean 'pipe'? /usr/include/unistd.h:437:12: note: 'pipe' declared here extern int pipe (int __pipedes[2]) __THROW __wur; ^ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lWs2_32: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:15:9: error: call to undeclared function 'semtimedop'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= semtimedop(id, &buf, n, (struct timespec *) 0); ^ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -lsendfile: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:12:3: error: call to undeclared function 'setproctitle'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] setproctitle("%s %d %s %c", "blah", 1, "x", 'X'); ^ try.c:8:2: error: call to undeclared function 'setprogname'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] setprogname("test"); ^ try.c:21:7: error: no member named 'sin_len' in 'struct sockaddr_in' addr.sin_len = 1; ~~~~ ^ try.c:2:10: fatal error: 'socker.h' file not found #include ^~~~~~~~~~ try.c:6:9: error: call to undeclared library function 'strlcat' with type 'unsigned long (char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= strlcat(&dst, "src", size); ^ try.c:6:9: note: include the header or explicitly provide a declaration for 'strlcat' try.c:6:9: error: call to undeclared library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret |= strlcpy(&dst, "src", size); ^ try.c:6:9: note: include the header or explicitly provide a declaration for 'strlcpy' try.c:2:10: fatal error: 'sys/sysctl.h' file not found #include ^~~~~~~~~~~~~~ try.c:12:9: warning: cast to smaller integer type 'int' from 'mcontext_t *' [-Wpointer-to-int-cast] return (int) &uc->uc_mcontext; ^~~~~~~~~~~~~~~~~~~~~~ try.c:8:19: warning: unused parameter 'x' [-Wunused-parameter] void blech(x) int x; { exit(3); } ^ try.c:8:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] void blech(x) int x; { exit(3); } ^ try.c:16:2: error: call to undeclared function 'pipe'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] pipe(pd); /* Down: child -> parent */ ^ try.c:18:11: error: call to undeclared function 'fork'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] if (0 != fork()) { ^ try.c:20:3: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] close(pd[1]); /* Parent reads from pd[0] */ ^ try.c:25:3: error: call to undeclared function 'alarm'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] alarm(5); ^ try.c:26:14: error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */ ^ try.c:28:3: error: call to undeclared library function 'sprintf' with type 'int (char *, const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] sprintf(string, "%d\n", ret); ^ try.c:28:3: note: include the header or explicitly provide a declaration for 'sprintf' try.c:29:3: error: call to undeclared function 'write'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] write(2, string, strlen(string)); ^ try.c:29:20: error: call to undeclared library function 'strlen' with type 'unsigned long (const char *)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] write(2, string, strlen(string)); ^ try.c:29:20: note: include the header or explicitly provide a declaration for 'strlen' try.c:33:4: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] printf("EAGAIN\n"); ^ try.c:33:4: note: include the header or explicitly provide a declaration for 'printf' try.c:43:3: error: call to undeclared function 'sleep'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] sleep(2); /* Give it time to close our pipe */ ^ try.c:52:2: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] close(pd[0]); /* We write to pd[1] */ ^ try.c:54:2: error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */ ^ 2 warnings and 12 errors generated. In file included from try.c:3: In file included from /usr/include/gtk-2.0/gtk/gtk.h:33: In file included from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32: In file included from /usr/include/gtk-2.0/gtk/gtkdialog.h:35: In file included from /usr/include/gtk-2.0/gtk/gtkwindow.h:36: In file included from /usr/include/gtk-2.0/gtk/gtkbin.h:35: In file included from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35: In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:36: In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37: /usr/include/gtk-2.0/gtk/gtktypeutils.h:236:34: warning: 'GTypeDebugFlags' is deprecated [-Wdeprecated-declarations] void gtk_type_init (GTypeDebugFlags debug_flags); ^ /usr/include/glib-2.0/gobject/gtype.h:706:19: note: 'GTypeDebugFlags' has been explicitly marked deprecated here } GTypeDebugFlags GLIB_DEPRECATED_TYPE_IN_2_36; ^ /usr/include/glib-2.0/glib/gversionmacros.h:570:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_36' # define GLIB_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE ^ /usr/include/glib-2.0/glib/gmacros.h:1278:30: note: expanded from macro 'GLIB_DEPRECATED_TYPE' #define GLIB_DEPRECATED_TYPE G_DEPRECATED ^ /usr/include/glib-2.0/glib/gmacros.h:1201:37: note: expanded from macro 'G_DEPRECATED' #define G_DEPRECATED __attribute__((__deprecated__)) ^ In file included from try.c:3: In file included from /usr/include/gtk-2.0/gtk/gtk.h:126: In file included from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30: In file included from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30: In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31: /usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations] GTimeVal last_popdown; ^ /usr/include/glib-2.0/glib/gtypes.h:574:35: note: 'GTimeVal' has been explicitly marked deprecated here typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); ^ /usr/include/glib-2.0/glib/gversionmacros.h:983:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_62_FOR' # define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) ^ /usr/include/glib-2.0/glib/gmacros.h:1279:37: note: expanded from macro 'GLIB_DEPRECATED_TYPE_FOR' #define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f) ^ /usr/include/glib-2.0/glib/gmacros.h:1211:44: note: expanded from macro 'G_DEPRECATED_FOR' #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) ^ 2 warnings generated. try.c:3:2: warning: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] printf("OK\n"); ^ try.c:3:2: note: include the header or explicitly provide a declaration for 'printf' try.c:4:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] exit(0); ^ try.c:4:2: note: include the header or explicitly provide a declaration for 'exit' 2 warnings generated. bar1.c:1:21: error: call to undeclared function 'bar2'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] int bar1() { return bar2(); } ^ bar1.c:1:21: note: did you mean 'bar1'? bar1.c:1:5: note: 'bar1' declared here int bar1() { return bar2(); } ^ ~~~~ bar1 foo.c:1:14: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] int main() { printf("%d\n", bar1()); return 0; } ^ foo.c:1:14: note: include the header or explicitly provide a declaration for 'printf' foo.c:1:29: error: call to undeclared function 'bar1'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] int main() { printf("%d\n", bar1()); return 0; } ^ 2 errors generated. clang-15: error: no such file or directory: 'foo.o' clang-15: error: no such file or directory: 'bar.a' try.c:25:6: warning: variable 'goo' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (doit()) ^~~~~~ try.c:27:6: note: uninitialized use occurs here if (goo == moo) ^~~ try.c:25:2: note: remove the 'if' if its condition is always true if (doit()) ^~~~~~~~~~~ try.c:8:15: note: initialize the variable 'goo' to silence this warning void (*goo)(); /* ptr to func returning void */ ^ = 0 :1:10: fatal error: 'invent.h' file not found #include ^~~~~~~~~~ In file included from :1: /usr/lib/llvm/15/bin/../../../../lib/clang/15.0.1/include/varargs.h:11:4: error: "Please use instead of " #error "Please use instead of " ^ :1:10: fatal error: 'sys/sysctl.h' file not found #include ^~~~~~~~~~~~~~ try.c:8:16: warning: variable 'n' set but not used [-Wunused-but-set-variable] static size_t n, srcleft, dstleft; ^ /usr/bin/x86_64-pc-linux-gnu-ld: cannot find -liconv: No such file or directory clang-15: error: linker command failed with exit code 1 (use -v to see invocation) try.c:8:16: warning: variable 'n' set but not used [-Wunused-but-set-variable] static size_t n, srcleft, dstleft; ^ clang-15: error: unknown argument: '-mieee'