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/> References: <bug-223752-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223752 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 defin= ed for functions that take no arguments (for gcc and clang). I'm very surpris= ed 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 the= se happen to be the values in argument registers when the constructors are invoked, but it's not intended behaviour. --=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-223752-29464-8AW3w7i329>