Patch Name: PHSS_20959 Patch Description: s700_800 10.x HP aC++ (A.01.23) to fix numerous defects Creation Date: 00/01/25 Post Date: 00/02/01 Repost: 00/05/12 The aC++ revision specified in the Products field was modified from A.01.23 to A.01.21. The patch should be applied to revision A.01.21. The patch delivers revision A.01.23 of the files. Only the patch documentation was modified to reflect this change, the files installed by the patch were not modified. Repost: 01/01/31 The patch documentation was modified to correct equivalent patch information. The reference to PHSS_20957 as an equivalent HP-UX 11.00 patch was modified to PHSS_20975 in the Equivalent Patches field. Only the patch documentation was modified to reflect this change, the files installed by the patch were not modified. Hardware Platforms - OS Releases: s700: 10.10 10.20 s800: 10.10 10.20 Products: HP aC++ B3910B A.01.21 Filesets: ACXX.ACXX Automatic Reboot?: No Status: General Release Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHSS_20959 Symptoms: PHSS_20959: 1. Error 641 may cause virtual call to be non-virtual 2. PCH: Assert in ImportExport.C with +hdr_use (anonymous enumeration) 3. TEMPLATES: Unfriendly message for '>>' t-arg terminator 4. Warning 823 on UINT32_MAX, for aC++ 5. RWTPtrSortedVector::index() doesn't return npos if not found 6. Core dump with +DA1.1 generated code virtual function with ... in shlib 7. Signal 11 on anonymous union in nested class of template in applyToNode 8. Signal 11 with string object in array of structs 9. Signal 11 on illegal friend class declaration 10. Signal 11 when trying to output ambiguity message 709 11. MEMBER TEMPLATES: wrong specialization invoked 12. Extra destructor called for array in try block 13. Warning 5004 on vector constructor for static_value 14. TEMPLATES: problem with out-of-line static const member initialization 15. MEMBER TEMPLATES: explicit arguments dropped when inside template decl 16. Disconnect between debug info and default args ctors 17. Problems if templete references incomplete struct that is completed 18. SIGABRT on second rethrow (in catch) 19. c++filt repeated function parms fail if in template class nested parms 20. Make error 93 illegal escape sequence, a future error 21. Need error 173 for member with same name as class 22. Error 106 unknown # commands, lower severity 23. Enclosing class should be in scope "class A::B : /*here A::*/ C {};" 24. Using declaration incorrectly suppresses sub-object ambiguity 25. Assert in Expand.C 2153 in compiler generated copy ctor 26. Bogus error 619 on wrong overloaded template function 27. Error 440 default argument fails when called from a template 28. Error 600 missing on friend function without return type 29. Error 22 with namespace scope operator, outside of namespace 30. Add +ESlit, at least for strings 31. type template static data member incorrectly changed 32. NEWLIB Error 710 & 870 with overloaded template function decl 33. Error 732 on template nested class 34. Error 176 const int X(1) not a treated as a const 35. Explicit specialization treated as inline if template is inline 36. PCH: precompiler headers cause stack overflow 37. Member template explicit instantiation gets unsat (or assert) 38. Signal 11 for template friend decl in parameterList 39. Signal 11 in convertDotArrowObjectPtr instead of error 187 40. A.01.21 reg: Unsat for static data in inline func 41. Signal 11 on virtual function, vtable is 0, only inline 42. Can't see global operators in namespace 43. Error 226 on string::copy not a const member function 44. get & getline don't store null char on EOF condition 45. Empty new initializer () doesn't initialize PODs 46. Error 226 function name not converted to bool 47. Error 5172 Backend Assert Unimplemented CVT, on (x=f()).y 48. Error 327 goto label doesn't work for certain cases 49. Signal 11 in Map::find with templates 50. Error 855 with same friends in different templates 51. Assertion in Statement.C, Line 237, insertBefore 52. Error 519 NON-type template arguments and 0 for pointer 53. (int*) cast doesn't increase alignment, poor +u1 code 54. Assert on string in template default arg, Signatures.C 55. Error 563 missing if first parm to operator new isn't size_t, in forward 56. NEWLIB: istream::getline eats blank lines, getline (,string) stops 57. Make-depend option to curb compile and print only dependencies on stdout 58. Assert on getAlignment in UC.MachineSpecificDetails.C on bad cast 59. ToT: Template unsat for static inline 60. Assert typename typedef in Expand.C 61. Assert in TypePackage.C on explicit destructor call 62. Signal 11 in replaceSubtree 63. Error 100 with -Y or other multibyte character corruption 64. Assert in Declaration.C operator mem-func of class in namespace 65. Error 100 with -Y, line splits in strings 66. Null pointer value isn't preserved on derived to base conversion 67. Error 172 friend & template problem 68. Error 519 should mention string literals not allowed 69. TEMPLATES: bogus future error 642 on baseclass 70. Bad code for inlined boolean function 71. Error 225 overloading problem not selecting cpy ctor on derived 72. Multibyte character corruption every 4K 73. Signal 11 doReduction1 on nested external declaration PHSS_20210: The list above is a superset of the fixes. PHSS_20542: The list above is a superset of the fixes. PHSS_19708: Signal 11 in c++filt Defect Description: PHSS_20959: 1. When attempting to recover from failed lookup at template definition time, the compiler forgets to consider polymorphic inheritance. In other words, it starts treating an unqualified name as a qualified one, thereby bypassing the virtual call mechanism. 2. Assert and gets Sig 11 on hdr_use. 3. TEMPLATES: Unfriendly message for '>>' t-arg terminator 4. Warning 823 and other errors will occur on UINT32_MAX. The token concatenation is not occurring. 5. The functions RWTPtrSortedVector::index() and RWTValSortedVector::index() don't return npos as documented, if it is < first element. It returns 0 instead. If in between elements it returns lower_bound. 6. Runtime aborts occur when compiling with +DA1.1 when a virtual function has ... and it is called from a shared library. 7. Signal 11 occurs in applyToNode when an anonymous union is declared in a nested class in a template. 8. Empty string constructor at end of initializer 9. The following illegal source causes signal 11: class A {friend class F;}; template class F {}; 10. A signal 11 may occur when trying to output an ambiguity error message 709. It is possibly that the error 709 should not appear either. 11. MEMBER TEMPLATES: wrong specialization invoked 12. Extra destructor called for array in try block 13. Warning 5004 may occur when optimizing when using vector constructor without specifying the default initial value. The vector elements are not set to their default values. The same thing occurs when using resize. 14. TEMPLATES: problem with out-of-line static const member initialization 15. MEMBER TEMPLATES: explicit arguments dropped when inside template decl 16. For the submitted test case, when a break point is set for the function fillList, the debugger does not break at the first statement of fillList. Instead, it breaks in the include file that contains the inline expansion of that statement. 17. Compiler either crashes or generates incorrect code for an pointer reference that depends on an incomplete (that is later completed) struct. The pointer is defined in a template class and the pointer's type uses an incomplete structure that is also lexically within the template class. 18. Signal 6 may occur if rethrowing from a catch clause after already rethrowing it once before in the caller of the current function. 19. c++filt may fail to demangle template functions with repeated parms. 20. Make error 93 illegal escape sequence, a future error 21. Undetected error: class X {int X;} 22. Error 106 unknown # commands, lower severity 23. Enclosing class should be in scope "class A::B : /*here A::*/ C {};" 24. Using declaration incorrectly suppresses sub-object ambiguity 25. Assert in Expand.C 2153 in compiler generated copy ctor 26. Bogus error on overloading while instantiating a template. 27. Error 440 default argument fails when called from a template 28. Error 600 missing on friend function without return type 29. Error 22 with namespace scope operator, outside of namespace 30. Add +ESlit, at least for strings 31. Bogus error + incorrect template instantiation (?) 32. NEWLIB Error 710 & 870 with overloaded template function decl 33. Template classes containing non-template member classes mistakenly get Error 732. 34. aC++ fails to honor const variables initialized with ()'s as constants. For example, line 3 below is flagged with an error saying an array must be declared using a constant value: 1 int main() { 2 const int max(10); 3 int array[max]; // invalid error 4 } 35. aCC mistakenly always treats function template specializations as inline when the generic function template is inline. E.g. template inline void f(T) { /* ... */} template<> void f<>(int) { /* ... */ } // inlined when it shouldn't be 36. PCH: precompiler headers cause stack overflow 37. Member template explicit instantiation gets unsat (or assert) 38. Signal 11 for template friend decl in parameterList 39. Mistakenly trying to access an enumerator value through an object that has a member of the enumerator value's enum type causes aCC to abort rather than producing the expected Error 187. Example: enum E { a, b }; struct S { E me; }; void f() { S s; s.a; // abort here } 40. Unsats occur for function scope statics in inline member function. 41. Use of an inline virtual function declared outside of the class with the inline keyword may cause aborts at runtime because the virtual table is not initialized. The class in question has protected derivation. 42. aC++ is performing the wrong kind of lookup for globally qualified operator calls, treating them very much like unqualified calls. 43. Error 226 may occur when using the string::copy member fuction on a const string object. 44. Use of istream::getline(ptr,) may not add a null character if it has an EOF. 45. aC++ fails to zero-initialize objects of POD (plain old data) type that are created via placement new. Example: new (mem) float(); // the 'float' object at address mem is garbage 46. Error 226 function name not converted to bool 47. An expression like the follow may cause the compiler to fail with Error 5172: (object1 = object2).member->memberFunction(); 48. A statment "goto label;" within a nested conditional or block scope where the label "label:" appears outside and after the "goto label;" statement will trigger a false error. 49. A signal 11 is encountered for the following code $ aCC -v -c ex.C template Out copy(In f,In l,Out r){ *r = *f; return r; } template It2 copy_backward(It1,It1,It2 r){ return r; } template struct os_list_iterator { T& operator*() const { return *pointer_; } T* pointer_; }; template struct os_list_const_iterator { const T& operator*() const { return *pointer_;} T* pointer_; }; template struct vector { vector& operator=(const vector<T>&); T* end() { return 0; } const T* end() const { return 0; } void insert(T*); }; template vector& vector::operator=(const vector<T>&) { insert(0); return *this; } template void vector::insert(T* pos) { copy_backward(pos, end(), end()); } typedef os_list_const_iterator > A; typedef os_list_iterator > B; template B copy(A, A, B); template int* copy_backward(int*, int*, int*); 50. Friend injection is incorrect. 51. Assertion in Statement.C, Line 237, insertBefore 52. Using 0 for a non-type template is not legal for pointer types. Error 519 will occur. template ... A<0> i; 53. If casting a local char array to an int*, poor +u1 code is generated. 54. A compiler assert may occur when illegally using a string in template default arg. 55. Error 563 missing if first parm to operator new isn't size_t, in forward 56. In the new Standard C++ Library getline(,string) stops on blank lines. istream::getline eats up the blank lines. 57. aCC has not make-depend options to prevent compile/preprocess AND print make-dependencies on stdout or any named file, not necessarily with ".d" suffix. 58. Casting a pointer-to-object to a pointer-to-function may trigger an assertion failure. typedef void (*ptrfun)(); ptrfun a = (ptrfun)"hello"; // aCC aborts 59. ToT: Template unsat for static inline 60. Assert typename typedef in Expand.C 61. A compiler assertion in TypePackage.C may occur on syntax like the following: tp[i].Type::~Type() where tp is a reference to a pointer to Type. 62. Compiler received signal 11 in replaceSubtree. 63. Error 100 with -Y or other multibyte character corruption 64. MemberFunction::classDecl asserts because the enclosing decl of the operator member function is the namespace the encloses its parent class instead of the parent class iteself. This problem does not occur for non-operator member functions. 65. Backslash-newline character sequences within quoted strings are not deleted when compiling with the -Y option. 66. The null pointer value isn't preserved on derived to base conversion where the compiler sees that the value is really 0. ostream *s = (ofstream*)0; Note there must be multiple base classes. 67. Error 172 friend & template problem 68. Error 519 should mention string literals not allowed 69. TEMPLATES: bogus future error 642 on baseclass 70. Incorrect code is generated for an inline function with boolean expression: bool check() { return !iC && iD; } if (!check()) 71. Bogus ambiguity error. 72. Same as 63 73. Signal 11 on nested external declaration. PHSS_20210: The list above is a superset of the fixes. PHSS_20542: The list above is a superset of the fixes. PHSS_19708: Signal 11 will appear in c++filt while demangling certain static member functions. SR: 0000000000 Patch Files: /opt/aCC/bin/aCC /opt/aCC/lbin/ctcom /opt/aCC/lib/nls/msg/C/aCC.cat /opt/aCC/lib/nls/msg/C/aCC.msgs /opt/aCC/bin/c++filt /opt/aCC/lib/libdemangle.a what(1) Output: /opt/aCC/bin/aCC: HP aC++ B3910B A.01.23 HP aC++ B3910B A.01.19.02 Language Support Library /opt/aCC/lib/nls/msg/C/aCC.cat: None /opt/aCC/lbin/ctcom: HP aC++ B3910B A.01.23 HP-UX SLLIC/OPTIMIZER UX.10.20.566: 10/06/99 linkstamp 01/25/00 14:25:59 HP aC++ B3910B A.01.19.02 Classic Iostream Library HP aC++ B3910B A.01.19.02 Language Support Library Ucode Code Generator - UX10.20.71 (PACG_UX10) REV: HP SESD Support Code High Level Optimizer - UX.10.21.991006 (UX10.MULTI(s ite-specific) [patch) -DHLO_RELEASE +O2] - 1 8-Nov-1999.11:24 /opt/aCC/lib/nls/msg/C/aCC.msgs: None /opt/aCC/bin/c++filt: HP aC++ B3910B A.01.23 HP aC++ B3910B A.01.19.02 Language Support Library /opt/aCC/lib/libdemangle.a: HP aC++ B3910B A.01.23 cksum(1) Output: 2893564351 200704 /opt/aCC/bin/aCC 135295360 10489856 /opt/aCC/lbin/ctcom 3319930824 117430 /opt/aCC/lib/nls/msg/C/aCC.cat 3022585305 235970 /opt/aCC/lib/nls/msg/C/aCC.msgs 2116151943 53248 /opt/aCC/bin/c++filt 2536627297 18884 /opt/aCC/lib/libdemangle.a Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_19708 PHSS_20542 PHSS_20210 Equivalent Patches: PHSS_20957: s700: 11.00 s800: 11.00 Patch Package Size: 10920 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_20959 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHSS_20959.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHSS_20959. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHSS_20959.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_20959.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None