Date: Sun, 19 Nov 2017 19:33:50 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 223752] clang __attribute__((constructor)) gets wrong input parameters Message-ID: <bug-223752-29464-8AW3w7i329@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-223752-29464@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223752 David Chisnall <theraven@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theraven@FreeBSD.org --- Comment #3 from David Chisnall <theraven@FreeBSD.org> --- This doesn't look like a bug. `__attribute__((constructor))` is only defined for functions that take no arguments (for gcc and clang). I'm very surprised if you don't get a compile-time warning. If `argc`, `argv` and `envp` are appearing as arguments, it's because, on some platforms / architectures these happen to be the values in argument registers when the constructors are invoked, but it's not intended behaviour. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223752-29464-8AW3w7i329>
