Closed Bug 61367 Opened 24 years ago Closed 24 years ago

Trunk Build error in profile/src/nsProfileAccess.h

Categories

(SeaMonkey :: General, defect, P2)

HP
HP-UX
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jdunn, Assigned: jdunn)

References

Details

Attachments

(1 file)

The HPUX 11.00 aCC 3.25 compiler has an issue with the explicit keyword when it is used for a contructor that has the class as a paramenter type to the class constructor. The error is: Error 513: "nsProfileAccess.h", line 37 # 'explicit' may be used only for converting constructors. explicit ProfileStruct(const ProfileStruct& src); ^^^^^^^^^^^^^ I have traced it to ccarlen's 1.11 revision to this file and have asked him if we could either remove the 'explicit' keyword or add the following change/hack (till we get the fix for the compiler). Index: nsProfileAccess.h ========================================= RCVS file: /cvsroot/mozilla/profile/src/nsProfileAccess.h,v retrieving revision 1.11 diff -c -r1.11 nsProfileAccess.h *** nsProfileAccess.h 2000/11/17 15:01:06 1.11 --- nsProfileAccess.h 2000/11/28 19:32:50 *************** *** 34,40 **** --- 34,47 ---- { public: explicit ProfileStruct() { } + #ifdef HPUX + /* The HP aCC 3.25 compiler has an 'issue' with explicit + * in this manner, removing until we get a compiler fix. + */ + ProfileStruct(const ProfileStruct& src); + #else explicit ProfileStruct(const ProfileStruct& src); + #endif /* HPUX */ ~ProfileStruct() { }
updating
Blocks: 18687
Status: NEW → ASSIGNED
Priority: P3 → P2
QA Contact: doronr → barrettl
probably |explicit| just needs to be removed here, not just for hpux. ccarlen? in general, one argument constructors should be marked |explicit| ... _except_ for copy-constructors. cls: I think I already define |explicit| as nothing on platforms that don't have it based on the autoconf define |HAVE_CPP_EXPLICIT|
I think that the explicit keyword should just go away. It was put there because of a comment in the earlier code about preventing inadvertent copies and assignments. The explicit on the copy constructor prevents this if the object were passed by value. It's an unneeded safeguard though.
ok, new diff based on scc's & ccarlen's review: removing explicit for every platform: Index: nsProfileAccess.h ========================================= RCVS file: /cvsroot/mozilla/profile/src/nsProfileAccess.h,v retrieving revision 1.11 diff -c -r1.11 nsProfileAccess.h *** nsProfileAccess.h 2000/11/17 15:01:06 1.11 --- nsProfileAccess.h 2000/11/29 11:49:28 *************** *** 34,40 **** { public: explicit ProfileStruct() { } ! explicit ProfileStruct(const ProfileStruct& src); ~ProfileStruct() { } --- 34,40 --- { public: explicit ProfileStruct() { } ! ProfileStruct(const ProfileStruct& src); ~ProfileStruct() { }
Patch has been checked in. Marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: