The C++ standard defines the C headers such as <string.h> and <wchar.h> in
terms of their C++ versions such as <cstring> and <cwchar>, which in turn are
defined in terms of the headers in the C standard.

Thus, <string.h> and <wchar.h> require the function overloads for functions
such as strchr and wcschr that are defined to be in <cstring> and <cwchar>. 
However, libstdc++ defines these only in <cstring> and <cwchar>, not in
<string.h> and <wchar.h>.

libstdc++ needs to wrap the headers provided by the C library, or otherwise
cooperate with glibc and other C library implementations, to get the required
C++ definitions in place.

This is different from bug 6257, and unlike that bug this one appears still to
be a bug with the current C++0x draft.


-- 
           Summary: overloads in C headers
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33935

Reply via email to