This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43881] warning attached to a function is emitted even though the function is not being called
- From: "bruno at clisp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2010 23:54:56 -0000
- Subject: [Bug c++/43881] warning attached to a function is emitted even though the function is not being called
- References: <bug-43881-128@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bruno at clisp dot org 2010-04-24 23:54 -------
When the line
static int (*safe_close) (int fd) = close;
is changed to
static int (*safe_close) (int fd) = ((void)0, close);
the warning also disappears, but then the generate code is suboptimal:
the variable safe_close is not eliminated from the 'data' section.
Therefore I cannot use this as a workaround.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881