This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22389] strlen from Function possible
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2005 19:29:34 -0000
- Subject: [Bug c/22389] strlen from Function possible
- References: <20050709192326.22389.kleinalex@gmx.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-09 19:29 -------
Since you did not give a prototype of strlen (by including string.h), the C standard talks about implicit
functions prototype and gives in this case strlen a prototype that takes a function type.
If you include string.h you will get a warning about incompatiable pointers which is what GCC emits as
GCC has an extension that implicitly converts any pointer to another without a cast. If you want an
error in that case use -pedantic-error.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22389