Date: Tue, 12 Mar 2024 05:59:47 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277649] clang version 17.0.6 compiles va_list to both integer and structure pointer Message-ID: <bug-277649-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277649 Bug ID: 277649 Summary: clang version 17.0.6 compiles va_list to both integer and structure pointer Product: Base System Version: 13.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jguojun@gmail.com new clang release 17.0.6 in 13.3-R generates a weird error on using va_list: /usr/bin/cc compiled va_list at line 8 as 'unsigned int', where at line 14,= cc compiles va_list as 'struct __va_list_tag *'. No other C compiler has a such issue. 1 /* ParseARGUment . C 2 # 3 */ 4 5 #include <stdarg.h> 6 7 struct a_build_ctrl_t { 8 va_list ap; /* why it is uint ??? */ 9 int last_arg_t, 10 List_In; 11 }; 12 13 void* 14 build_arg_fmt_list(void* fmt, va_list ap) // here is a struct= ure pointer 15 { 16 int tBE, na=3D1, Nv; 17 register int n, ne; 18 char *cp, *cpr, *fmtp; 19 struct a_build_ctrl_t abc =3D {ap, 0}; 20 #define nv ne 21 // ... 22 } cc: warning: -Wl,--allow-shlib-undefined: 'linker' input unused [-Wunused-command-line-argument] parsargu.c:20:30: error: incompatible pointer to integer conversion initializing 'unsigned int' with an expression of type 'struct __va_list_ta= g *' [-Wint-conversion] 20 | struct a_build_ctrl_t abc =3D {ap, 0}; | ^~ 1 error generated. *** Error code 1 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277649-227>