Date: Sun, 12 Sep 2021 20:51:54 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 258465] chinese/c2t: fix build with clang 13 Message-ID: <bug-258465-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258465 Bug ID: 258465 Summary: chinese/c2t: fix build with clang 13 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: dim@FreeBSD.org During an exp-run for llvm 13 (see bug 258209), it turned out that chinese/= c2t fails to build with clang 13: cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing=20 -DCHINDICT=3D\"/usr/local/share/chinese/gb/TONEPY.tit\" -c c2t.c c2t.c:99:3: error: address of register variable requested hz[2] =3D '\0'; ^~ c2t.c:107:7: error: address of register variable requested hz[0] =3D (char)eka; ^~ c2t.c:108:7: error: address of register variable requested hz[1] =3D (char)toka; ^~ c2t.c:113:8: error: address of register variable requested if (hz[0] !=3D (*pipo)[i] || hz[1] !=3D (*pipo)[i+1]) continue; ^~ c2t.c:113:31: error: address of register variable requested if (hz[0] !=3D (*pipo)[i] || hz[1] !=3D (*pipo)[i+1]) continue; ^~ c2t.c:133:36: error: address of register variable requested fprintf(miss_chars, "%c", hz[0]); ^~ c2t.c:134:30: error: address of register variable requested fprintf(miss_chars, "%c ", hz[1]); ^~ c2t.c:143:17: error: address of register variable requested printf("%c", hz[0]); ^~ c2t.c:144:18: error: address of register variable requested printf("%c ", hz[1]); ^~ 9 errors generated. As indicated, arrays shouldn't be register variables as they don't have addresses. In general, the register keyword is deprecated and should no lon= ger be used. To fix this, use a command line flag to define "register" to empty. --=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-258465-7788>