Closed Bug 643772 Opened 14 years ago Closed 14 years ago

dom/plugins can't compile on mingw due to implicit function pointer to void* casts

Categories

(Core Graveyard :: Plug-ins, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jacek, Assigned: jacek)

Details

Attachments

(2 files, 1 obsolete file)

Attached patch fix v1.0 (obsolete) — Splinter Review
It's the same problem as bug 606846, discovered after enabling IPC
Attachment #520930 - Flags: review?(benjamin)
Attached patch fix v1.1Splinter Review
I've updated this patch to fix also win64 implementation (instead of filing separated bug). The problem is that cast from pointer to integer that loses precision is an error on GCC. The fix is to cast to uintptr_t instead and use implicit cast on its result. It's a similar problem to bug 611986
Attachment #520930 - Attachment is obsolete: true
Attachment #520930 - Flags: review?(benjamin)
Attachment #521577 - Flags: review?(benjamin)
Comment on attachment 521577 [details] [diff] [review] fix v1.1 I would be happier if this were reinterpret_cast<void*>(value). r=me with that change
Attachment #521577 - Flags: review?(benjamin) → review+
Attached patch fix v2.0Splinter Review
Thanks for review. reinterpret_cast is problematic, because GCC considers this case too illegal to allow it and reports an error. It's, however, possible to avoid even more casts if we change nsWindowsDllInterceptor.h to use intptr_t as an argument instead of void*. It's casted to intptr_t later anyway and on callers side, casts are still unavoidable, but reinterpret_cast works fine now.
Attachment #526480 - Flags: review?(benjamin)
Attachment #526480 - Flags: review?(benjamin) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: