Closed Bug 344694 Opened 14 years ago Closed 14 years ago

Conflict of linkage-specification for "MimeExternalObjectClass mimeExternalObjectClass"

Categories

(MailNews Core :: MIME, defect, minor)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asrail, Assigned: asrail)

References

()

Details

(Keywords: fixed1.8.0.7, fixed1.8.1)

Attachments

(3 files)

According with section 7.5 of http://www.open-std.org/jtc1/sc22/wg21/docs/wp/html/oct97/dcl.html a explicit linkage specification should be declared before an implicit.

GCC 4.2 will break the code which doesn't conform to it.

So, it's lacking an explicit declaration of "MimeExternalObjectClass mimeExternalObjectClass" in mimeeobj.h.
Status: NEW → ASSIGNED
OS: Linux → All
Assignee: nobody → asrail
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Comment on attachment 229263 [details] [diff] [review]
Adds an explicit linkage to "MimeExternalObjectClass mimeExternalObjectClass"

let me give this a try.
Attachment #229263 - Flags: review? → review?(bienvenu)
Attachment #229263 - Flags: review?(bienvenu) → review+
fixed on trunk, thx for the patch. We won't need this for the 1.8.1 branch, will we?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 229263 [details] [diff] [review]
Adds an explicit linkage to "MimeExternalObjectClass mimeExternalObjectClass"

why not just:
extern "C"  MimeExternalObjectClass mimeExternalObjectClass;
(In reply to comment #4)
> (From update of attachment 229263 [details] [diff] [review] [edit])
> why not just:
> extern "C"  MimeExternalObjectClass mimeExternalObjectClass;
> 

Nothing against it...
*** Bug 345134 has been marked as a duplicate of this bug. ***
Attached patch patchSplinter Review
The single-line syntax is also used at http://lxr.mozilla.org/seamonkey/source/mailnews/mime/src/mimemult.cpp#72, so I think this should be changed for consistency.

I actually think this'd be good for the branch... being able to use up-to-date compilers is kind of nice
Attachment #229772 - Flags: superreview?(bienvenu)
Attachment #229772 - Flags: review?(bienvenu)
Attachment #229772 - Flags: superreview?(bienvenu)
Attachment #229772 - Flags: superreview+
Attachment #229772 - Flags: review?(bienvenu)
Attachment #229772 - Flags: review+
same as the "patch" attachment above, but against branch
Attachment #229777 - Flags: approval1.8.1?
This should be a safe change, as it affects compilation only; no runtime impact.
*** Bug 345152 has been marked as a duplicate of this bug. ***
Comment on attachment 229777 [details] [diff] [review]
1.8 branch version

we should have the same on 1.8.0.6 as it breaks build with new gcc
Attachment #229777 - Flags: approval1.8.0.6?
Comment on attachment 229777 [details] [diff] [review]
1.8 branch version

a=dbaron on behalf of drivers.  Please check in to the MOZILLA_1_8_BRANCH and mark fixed1.8.1 when you have.
Attachment #229777 - Flags: approval1.8.1? → approval1.8.1+
Comment on attachment 229772 [details] [diff] [review]
patch

Checking in mailnews/mime/src/mimeeobj.h;
/cvsroot/mozilla/mailnews/mime/src/mimeeobj.h,v  <--  mimeeobj.h
new revision: 1.6; previous revision: 1.5
done
MOZILLA_1_8_BRANCH:

Checking in mailnews/mime/src/mimeeobj.h;
/cvsroot/mozilla/mailnews/mime/src/mimeeobj.h,v  <--  mimeeobj.h
new revision: 1.4.28.1; previous revision: 1.4
done
Keywords: fixed1.8.1
Comment on attachment 229777 [details] [diff] [review]
1.8 branch version

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #229777 - Flags: approval1.8.0.7? → approval1.8.0.7+
checked in to MOZILLA_1_8_0_BRANCH
Keywords: fixed1.8.0.7
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.