[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#46719: towupper() macro generates compiler warning with C++



Package: libc6-dev
Version: 2.0.7.19981211

lyonesse$ cat t.cc
#include <wctype.h>
#include <stddef.h>

wchar_t foo(wchar_t c) {
    return towupper(c);
}

lyonesse$ c++ -c t.cc
t.cc: In function `__wchar_t foo(__wchar_t)':
t.cc:5: warning: passing `const int *' as argument 2 of `towctrans(wint_t, const unsigned int *)' changes signedness

lyonesse$ cat u.cc
#include <cwctype>

wchar_t foo(wchar_t c) {
    return towupper(c);
}

lyonesse$ c++ -c u.cc
u.cc: In function `__wchar_t foo(__wchar_t)':
u.cc:4: warning: passing `const int *' as argument 2 of `towctrans(wint_t, const unsigned int *)' changes signedness

Header files from the C or C++ library should not produce compiler
warnings, as it makes the `-Werror' option useless.

ii  g++             2.91.60-5      The GNU (egcs) C++ compiler.

ttfn/rjk


Reply to: