This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/47972] error.c:158:7: warning: return makes pointer from integer without a cast
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 3 Mar 2011 17:58:34 +0000
- Subject: [Bug libfortran/47972] error.c:158:7: warning: return makes pointer from integer without a cast
- Auto-submitted: auto-generated
- References: <bug-47972-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47972
Janne Blomqvist <jb at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011.03.03 17:58:32
CC| |jb at gcc dot gnu.org
Ever Confirmed|0 |1
Severity|normal |trivial
--- Comment #2 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-03-03 17:58:32 UTC ---
>From the code, with line numbers:
153 /* TODO: How to prevent the compiler warning due to strerror_r of
154 the untaken branch having the wrong return type? */
155 if (__builtin_classify_type (strerror_r (0, buf, 0)) == 5)
156 {
157 /* GNU strerror_r() */
158 return strerror_r (errnum, buf, buflen);
159 }
160 else
161 {
162 /* POSIX strerror_r () */
163 strerror_r (errnum, buf, buflen);
164 return buf;
165 }
That is, this warning is not an indication of a real problem, as the "wrong"
branch is never taken. Unless somebody has a clever idea how to silence the
compiler warning, I'm planning on closing as WONTFIX.