[
https://issues.apache.org/jira/browse/STDCXX-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Sebor resolved STDCXX-873.
---------------------------------
Resolution: Fixed
Turns out the problem is caused by the GNU libc headers which make use of the
{{long long}} type. Since we compile with the EDG eccp -A option for strict C++
98 conformance the compiler errors out on the {{long long}} type in all config
tests that #include such headers. The fix committed in
[rev648332|http://svn.apache.org/viewvc?rev=648332&view=rev] suppresses the
error during the configuration process.
Here's the command line and the compiler output for the config test for
{{wcslen()}}:
{noformat}
eccp -c -DCHECK_DECL -A -x --template_directory=/build/sebor/stdcxx-eccp-3.9-11s
/lib -g --display_error_number --remarks --diag_suppress 193,236,340,401,261,4
79,487,678,679,815 -DHDRNAME="<wchar.h>" -DFUNNAME=wcslen -DFUN=wcslen -DTAKE_
ADDR=1 /tmp/libc_decl_tmpsrc-27270.cpp -o /tmp/wcslen-27270.o
"/usr/include/wchar.h", line 508: error #450-D: the type "long long" is
nonstandard
extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
^
"/usr/include/wchar.h", line 515: error #450-D: the type "long long" is
nonstandard
extern unsigned long long int __wcstoull_internal (__const wchar_t *
^
2 errors detected in the compilation of "/tmp/libc_decl_tmpsrc-27270.cpp".
{noformat}
> [EDG eccp 3.9/SuSE 9] wcslen() not declared in <wchar.h>
> --------------------------------------------------------
>
> Key: STDCXX-873
> URL: https://issues.apache.org/jira/browse/STDCXX-873
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 21. Strings
> Affects Versions: 4.2.0
> Environment: Edison Design Group C/C++ Front End, version 3.9 (Mar 24
> 2007 16:01:33)
> SUSE LINUX Enterprise Server 9 (x86_64)
> Reporter: Martin Sebor
> Assignee: Martin Sebor
> Fix For: 4.2.1
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The C++ '98 function {{wcslen()}} required to be declared in {{<wchar.h>}}
> and {{<cwchar>}} is not declared in our version of the former header when
> compiling with EDG eccp on SuSE Linux 9. The function is declared in
> {{<cwchar>}} as expected.
> {noformat}
> $ cat t.cpp && make t
> #include <wchar.h>
> int main ()
> {
> return wcslen (L"");
> }
> generating dependencies for t.cpp
> eccp -M -I$TOPDIR/include/ansi -D_RWSTDDEBUG -I$TOPDIR/include
> -I/build/sebor/stdcxx-eccp-3.9-11s/include -I$TOPDIR/examples/include -A -x
> --template_directory=/build/sebor/stdcxx-eccp-3.9-11s/lib -g
> --display_error_number --remarks --diag_suppress
> 193,236,340,401,261,479,487,678,679,815 t.cpp
> eccp -c -I$TOPDIR/include/ansi -D_RWSTDDEBUG -I$TOPDIR/include
> -I/build/sebor/stdcxx-eccp-3.9-11s/include -I$TOPDIR/examples/include -A -x
> --template_directory=/build/sebor/stdcxx-eccp-3.9-11s/lib -g
> --display_error_number --remarks --diag_suppress
> 193,236,340,401,261,479,487,678,679,815 t.cpp
> "t.cpp", line 5: error #20: identifier "wcslen" is undefined
> return wcslen (L"");
> ^
> 1 error detected in the compilation of "t.cpp".
> make: *** [t.o] Error 2
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.