Bug 486095 - conflict between docs and headers
Summary: conflict between docs and headers
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 486096
TreeView+ depends on / blocked
 
Reported: 2009-02-18 11:23 UTC by Dan Horák
Modified: 2009-02-18 11:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 486096 (view as bug list)
Environment:
Last Closed: 2009-02-18 11:57:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan Horák 2009-02-18 11:23:07 UTC
There is a conflict between "info" documentation and declarations for str* functions

info:
Function: char * strchr (const char *STRING, int C)
...

string.h:
extern char *strchr (char *__s, int __c)

at least strchr and strrchr are affected (the "const" modifier was dropped)

versions:
glibc-devel-2.9.90-3.x86_64

Comment 1 Jakub Jelinek 2009-02-18 11:41:21 UTC
You are reading the header incorrectly.  The info documentation as well as man pages correctly document the prototype for C.
For C++ this is different, strchr etc. are overloaded, as required by ISO C++
standard.

Comment 2 Dan Horák 2009-02-18 11:57:42 UTC
Oh, you are right. But probably a note could be added into the docs about this C++ incompatibility.


Note You need to log in before you can comment on or make changes to this bug.