Issue Details (XML | Word | Printable)

Key: STDCXX-771
Type: Sub-task Sub-task
Status: Open Open
Priority: Minor Minor
Assignee: Martin Sebor
Reporter: Scott (Yu) Zhong
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library
STDCXX-726

[HP aCC 6.16] multiple cadvise warnings in money tests

Created: 17/Mar/08 05:01 PM   Updated: 23/Apr/08 10:58 PM
Return to search
Component/s: Tests
Affects Version/s: 4.2.0
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 2h
Original Estimate - 2h
Remaining Estimate: 1h
Time Spent - 1h Remaining Estimate - 1h
Time Spent: 1h
Time Spent - 1h Remaining Estimate - 1h

Environment:
$ uname -sr && aCC -V
HP-UX B.11.31
aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]


 Description  « Hide
The 22.locale.moneypunct.cpp and 22.locale.money.put.cpp tests generate a number of HP aCC 6/cadvise warnings, in addition to other diagnostics:
aCC -c    -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  +O2  +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348   $(TOPDIR)/tests/localization/22.locale.money.put.cpp
"$(TOPDIR)/include/string.cc", line 646: remark #4271-D: type conversion may lose sign
                                       *__first2++);
                                       ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::__replace_aux(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 519
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/include/string.cc", line 661: remark #4271-D: type conversion may lose sign
                                       *__first2++);
                                       ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::__replace_aux(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 519
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/include/string.cc", line 550: remark #4271-D: type conversion may lose sign
          traits_type::assign (*__first3, *__first2);
                                          ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

aCC 22.locale.money.put.o -o 22.locale.money.put -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s   -mt +DD64 -L$(BUILDDIR)/lib  -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd  -lm 
aCC -c    -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  +O2  +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348   $(TOPDIR)/tests/localization/22.locale.money.put.mt.cpp
aCC 22.locale.money.put.mt.o -o 22.locale.money.put.mt -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s   -mt +DD64 -L$(BUILDDIR)/lib  -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd  -lm 
aCC -c    -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  +O2  +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348   $(TOPDIR)/tests/localization/22.locale.moneypunct.cpp
"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp, line 366)

"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation

"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp, line 366)

aCC 22.locale.moneypunct.o -o 22.locale.moneypunct -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s   -mt +DD64 -L$(BUILDDIR)/lib  -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd  -lm 
aCC -c    -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  +O2  +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348   $(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp
"$(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp", line 367: remark #2177-D: variable "pos" was declared but never referenced
              const std::wstring pos = mp.positive_sign ();
                                 ^

"$(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp", line 368: remark #2177-D: variable "neg" was declared but never referenced
              const std::wstring neg = mp.negative_sign ();
                                 ^


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Scott (Yu) Zhong made changes - 17/Mar/08 05:35 PM
Field Original Value New Value
Summary [HP aCC 6.15] Floating-point DIVIDE BY ZERO exception generated [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated
Scott (Yu) Zhong made changes - 17/Mar/08 05:41 PM
Summary [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated in 22.locale.money.put.cpp
Scott (Yu) Zhong made changes - 17/Mar/08 05:45 PM
Description "/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
Summary [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated in 22.locale.money.put.cpp [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated and Potential null pointer dereference in 22.locale.money.put.cpp
Scott (Yu) Zhong made changes - 17/Mar/08 07:20 PM
Description "/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation
Summary [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated and Potential null pointer dereference in 22.locale.money.put.cpp [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated, Potential null pointer dereference and #20210-D: Mismatch in allocation and deallocation in 22.locale.money.put.cpp
Martin Sebor added a comment - 18/Mar/08 06:06 PM
Shrank Summary.

Martin Sebor made changes - 18/Mar/08 06:06 PM
Summary [HP aCC 6.16] Floating-point DIVIDE BY ZERO exception generated, Potential null pointer dereference and #20210-D: Mismatch in allocation and deallocation in 22.locale.money.put.cpp [HP aCC 6.16] multiple cadvise warnings in 22.locale.money.put.cpp
Martin Sebor added a comment - 18/Mar/08 06:07 PM
Lowered Priority to Minor since this is just a test.

Martin Sebor made changes - 18/Mar/08 06:07 PM
Priority Major [ 3 ] Minor [ 4 ]
Scott (Yu) Zhong added a comment - 31/Mar/08 05:45 AM
add compile line to description

Scott (Yu) Zhong made changes - 31/Mar/08 05:45 AM
Description "/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation
aCC -c -mt -I/amd/devco/scottz/stdcxx/4.2.x/include -I/build/scottz/12d/include -I/amd/devco/scottz/stdcxx/4.2.x/tests/include -AA +O2 +DD64
 +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284 +W4285 +W4286 /amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation
Martin Sebor made changes - 23/Apr/08 10:47 PM
Assignee Martin Sebor [ sebor ]
Repository Revision Date User Message
ASF #651095 Wed Apr 23 22:50:27 UTC 2008 sebor 2008-04-23 Martin Sebor <sebor@roguewave.com>

STDCXX-771
* test/localization/22.locale.money.put.cpp (run_test): Used volatile
to conceal division by zero from optimizers and to silence HP aCC 6
warning #20010-D: Floating-point DIVIDE BY ZERO exception generated.
* test/localization/22.locale.moneypunct.cpp (lconvdup): Used
operator new instead of the new expression to allocate a type-less
block of memory.
(check_moneypunct): Deallocated the block of memory allocated in
lconvdup() using the matching operator delete() to silence HP aCC
warning #20210-D: Mismatch in allocation and deallocation.
Files Changed
MODIFY /stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp
MODIFY /stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp

Martin Sebor added a comment - 23/Apr/08 10:53 PM
Corrected Summary and Description (the issue conflates problems in two tests).

Martin Sebor made changes - 23/Apr/08 10:53 PM
Description aCC -c -mt -I/amd/devco/scottz/stdcxx/4.2.x/include -I/build/scottz/12d/include -I/amd/devco/scottz/stdcxx/4.2.x/tests/include -AA +O2 +DD64
 +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284 +W4285 +W4286 /amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)
"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp, line 366)

"/amd/devco/scottz/stdcxx/4.2.x/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation
The [22.locale.moneypunct.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp] and [22.locale.money.put.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/tests/localization/22.locale.moneyput.cpp] tests generate a number of HP aCC 6/cadvise warnings, in addition to other diagnostics:

{noformat}
aCC -c -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include -AA +O2 +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348 $(TOPDIR)/tests/localization/22.locale.money.put.cpp
"$(TOPDIR)/include/string.cc", line 646: remark #4271-D: type conversion may lose sign
                                       *__first2++);
                                       ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::__replace_aux(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 519
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/include/string.cc", line 661: remark #4271-D: type conversion may lose sign
                                       *__first2++);
                                       ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::__replace_aux(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 519
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/include/string.cc", line 550: remark #4271-D: type conversion may lose sign
          traits_type::assign (*__first3, *__first2);
                                          ^
          detected during:
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter, void *) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 616 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator> &std::basic_string<_CharT, _Traits, _Allocator>::replace(_Allocator::pointer, _Allocator::pointer, _InputIter, _InputIter) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 191 of "$(TOPDIR)/include/string"
            instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIter, _InputIter, const _Allocator &) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>, _InputIter=char *]" at line 353 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "int type_test(int, charT, long double, const char *, char, int, int, int, const char *, const char *) [with charT=wchar_t]" at line 434 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"
            instantiation of "void ldbl_test(charT) [with charT=wchar_t]" at line 852 of "$(TOPDIR)/tests/localization/22.locale.money.put.cpp"

"$(TOPDIR)/tests/localization/22.locale.money.put.cpp", line 837, procedure run_test: warning #20010-D: Floating-point DIVIDE BY ZERO exception generated

aCC 22.locale.money.put.o -o 22.locale.money.put -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s -mt +DD64 -L$(BUILDDIR)/lib -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd -lm
aCC -c -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include -AA +O2 +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348 $(TOPDIR)/tests/localization/22.locale.money.put.mt.cpp
aCC 22.locale.money.put.mt.o -o 22.locale.money.put.mt -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s -mt +DD64 -L$(BUILDDIR)/lib -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd -lm
aCC -c -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include -AA +O2 +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348 $(TOPDIR)/tests/localization/22.locale.moneypunct.cpp
"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 272, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp, line 366)

"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 432, procedure check_moneypunct: warning #20210-D: Mismatch in allocation and deallocation

"$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp", line 425, procedure check_moneypunct: warning #20200-D: Potential null pointer dereference through plconv is detected (null definition:$(TOPDIR)/tests/localization/22.locale.moneypunct.cpp, line 366)

aCC 22.locale.moneypunct.o -o 22.locale.moneypunct -L$(BUILDDIR)/rwtest -lrwtest -AA +nostl -Wl,+s -mt +DD64 -L$(BUILDDIR)/lib -Wl,+b$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd -lm
aCC -c -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include -AA +O2 +DD64 +w +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348 $(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp
"$(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp", line 367: remark #2177-D: variable "pos" was declared but never referenced
              const std::wstring pos = mp.positive_sign ();
                                 ^

"$(TOPDIR)/tests/localization/22.locale.moneypunct.mt.cpp", line 368: remark #2177-D: variable "neg" was declared but never referenced
              const std::wstring neg = mp.negative_sign ();
                                 ^
{noformat}
Summary [HP aCC 6.16] multiple cadvise warnings in 22.locale.money.put.cpp [HP aCC 6.16] multiple cadvise warnings in money tests
Martin Sebor logged work - 23/Apr/08 10:54 PM
Time Worked: 1h
Silenced some but not all warnings.
Martin Sebor made changes - 23/Apr/08 10:54 PM
Time Spent 1h [ 3600 ]
Remaining Estimate 2h [ 7200 ] 1h [ 3600 ]
Martin Sebor added a comment - 23/Apr/08 10:58 PM
After r651095 22.locale.money.put is free of warnings (just remarks) but 22.locale.moneypunct.cpp still has a couple of warnings. They look bogus to me but I'll need more time to reduce it to a test case for a compiler bug.
"/amd/devco/sebor/stdcxx-4.2.x/tests/localization/22.locale.moneypunct.cpp", line 274, procedure check_moneypunct: warning #20200-D: 
          Potential null pointer dereference through plconv is detected (null
          definition:/amd/devco/sebor/stdcxx-4.2.x/tests/localization/22.locale
          .moneypunct.cpp, line 368)

"/amd/devco/sebor/stdcxx-4.2.x/tests/localization/22.locale.moneypunct.cpp", line 427, procedure check_moneypunct: warning #20200-D: 
          Potential null pointer dereference through plconv is detected (null
          definition:/amd/devco/sebor/stdcxx-4.2.x/tests/localization/22.locale
          .moneypunct.cpp, line 368)

Martin Sebor added a comment - 23/Apr/08 10:58 PM
Deferred the rest until 4.2.2.

Martin Sebor made changes - 23/Apr/08 10:58 PM
Fix Version/s 4.2.1 [ 12312690 ]
Fix Version/s 4.2.2 [ 12313096 ]
Repository Revision Date User Message
ASF #651334 Thu Apr 24 18:20:08 UTC 2008 sebor 2008-04-24 Martin Sebor <sebor@roguewave.com>

Merged revs 651098, 651095, 651086, 651034, 651029, 651012, 650944,
and 650678 from 4.2.x.

2008-04-22 Martin Sebor <sebor@roguewave.com>

        STDCXX-753
        * util/charmap.cpp (Charmap::convert_to_ucs): Unconditionally
        allocated (8 + 1) bytes for the longest UTF-8 character rather
        than assuming that MB_LEN_MAX is large enough.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-879
        * tests/algorithms/25.random.shuffle.cpp: Changed the type used
        to explicitly instantiate the algorithm to avoid HP aCC remark
        4271: type conversion may lose sign.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-775
        * test/localization/22.locale.time.get.cpp (make_LC_TIME): Asserted
        postconditions to silence HP aCC 6/cadvise warning #20200: Potential
        null pointer dereference.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-771
        * test/localization/22.locale.money.put.cpp (run_test): Used volatile
        to conceal division by zero from optimizers and to silence HP aCC 6
        warning #20010-D: Floating-point DIVIDE BY ZERO exception generated.
        * test/localization/22.locale.moneypunct.cpp (lconvdup): Used
        operator new instead of the new expression to allocate a type-less
        block of memory.
        (check_moneypunct): Deallocated the block of memory allocated in
        lconvdup() using the matching operator delete() to silence HP aCC
        warning #20210-D: Mismatch in allocation and deallocation.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-757
        * tests/src/value.cpp (UserClass::assign): Added a (redundant) default
        label to switch statement to shut up bogus HP aCC warning #20200-D:
        Potential null pointer dereference.
        (__rw_from_char): Asserted a trivially true precondition to silence
        the same warning.
        (_rw_fmtxarrayv): Removed an unused local variable.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-745
        STDCXX-746
        STDCXX-747
        * src/locale_body.cpp [6 <= HP aCC <= 6.16]: Silenced bogus HP aCC
        6.16/cadvise warning #20200-D: Potential null pointer dereference.
        * src/locale_name.cpp: Same.
        * locale_combine.cpp: Same.

        STDCXX-879
        * src/locale_combine.cpp (_C_get_body): Used a previously computed
        value of the expected type to silence HP aCC remark #4271 type
        conversion may lose sign.

2008-04-23 Martin Sebor <sebor@roguewave.com>

        STDCXX-729
        * include/loc/_money_put.cc [__GNUG__] (_C_put): Silenced bogus
        gcc -Wuninitialized warning: object may be used uninitialized in
        this function while avoiding bogus HP aCC/cadvise warning 20200:
        potential null pointer dereference.
Files Changed
MODIFY /stdcxx/trunk/tests/src/value.cpp
MODIFY /stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp
MODIFY /stdcxx/trunk/tests/localization/22.locale.money.put.cpp
MODIFY /stdcxx/trunk/src/locale_combine.cpp
MODIFY /stdcxx/trunk/src/locale_body.cpp
MODIFY /stdcxx/trunk/util/charmap.cpp
MODIFY /stdcxx/trunk/include/loc/_money_put.cc
MODIFY /stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
MODIFY /stdcxx/trunk/tests/localization/22.locale.time.get.cpp
MODIFY /stdcxx/trunk/src/locale_name.cpp