This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/19622] Support aliasing with struct sockaddr
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 15 Feb 2016 10:52:55 +0000
- Subject: [Bug network/19622] Support aliasing with struct sockaddr
- Auto-submitted: auto-generated
- References: <bug-19622-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19622
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
This does not work as expected because it breaks forward declarations:
struct sockaddr;
struct sockaddr *f();
struct __attribute__((may_alias)) sockaddr {};
struct sockaddr *f()
{
return nullptr;
}
results in:
t.cc: In function âsockaddr* f()â:
t.cc:5:18: error: ambiguating new declaration of âsockaddr* f()â
struct sockaddr *f()
^
t.cc:2:18: note: old declaration âsockaddr* f()â
struct sockaddr *f();
^
--
You are receiving this mail because:
You are on the CC list for the bug.