This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4681] declaring “strcmp()” as an extern function with inclusion of “string.h” is causing compilation error
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Jul 2007 15:56:31 -0000
- Subject: [Bug libc/4681] declaring “strcmp()” as an extern function with inclusion of “string.h” is causing compilation error
- References: <20070621092629.4681.suma.sharma@kpitcummins.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2007-07-02 15:56 -------
That's irrelevant.
The functions may but don't have to be implemented as macros and even the macros
may or may not have definitions which cause compile errors when you incorrectly
try to provide prototype after including string.h.
The standard clearly says what you are doing is invalid. See e.g. ISO C99,
7.1.4/1 or
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html#tag_02_02_02
(in the latter particularly:
"Applications shall not declare or define identifiers with the same name as an
identifier reserved in the same context.").
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=4681
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.