From 21ae07e7cd7b54967d8e486e2b443816debe7fa1 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 11 Apr 2023 22:13:00 +0200 Subject: sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Link: Reported-by: Bastien Roucariès Reported-by: Alejandro Colomar Reviewed-by: Eric Blake Cc: glibc Cc: GCC Cc: Stefan Puiu Cc: Igor Sysoev Cc: Rich Felker Cc: Andrew Clayton Cc: Richard Biener Cc: Zack Weinberg Cc: Florian Weimer Cc: Joseph Myers Cc: Jakub Jelinek Cc: Sam James Signed-off-by: Alejandro Colomar --- man3type/sockaddr.3type | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man3type/sockaddr.3type b/man3type/sockaddr.3type index 2fdf56c59..cf8d601f5 100644 --- a/man3type/sockaddr.3type +++ b/man3type/sockaddr.3type @@ -117,6 +117,14 @@ POSIX.1-2001. was invented by POSIX. See also .BR accept (2). +.PP +These structures were invented before modern ISO C strict-aliasing rules. +If aliasing rules are applied strictly, +these structures would be extremely difficult to use +without invoking Undefined Behavior. +POSIX Issue 8 will fix this by requiring that implementations +make sure that these structures +can be safely used as they were designed. .SH NOTES .I socklen_t is also defined in -- cgit v1.2.3