https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277649
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: [email protected]
Reporter: [email protected]
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 structure
pointer
15 {
16 int tBE, na=1, Nv;
17 register int n, ne;
18 char *cp, *cpr, *fmtp;
19 struct a_build_ctrl_t abc = {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_tag *'
[-Wint-conversion]
20 | struct a_build_ctrl_t abc = {ap, 0};
| ^~
1 error generated.
*** Error code 1
--
You are receiving this mail because:
You are the assignee for the bug.