This is an archive of the discontinued LLVM Phabricator instance.

SBHostOS: Fix a pointer-to-function to void-pointer cast
ClosedPublic

Authored by majnemer on Jul 22 2014, 1:13 PM.

Details

Summary

reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.

This fixes a warning emitted by GCC.

Diff Detail

Repository
rL LLVM

Event Timeline

majnemer updated this revision to Diff 11775.Jul 22 2014, 1:13 PM
majnemer retitled this revision from to SBHostOS: Fix a pointer-to-function to void-pointer cast.
majnemer updated this object.
majnemer added reviewers: zturner, tfiala.
majnemer added a subscriber: Unknown Object (MLST).
majnemer closed this revision.Jul 22 2014, 3:08 PM
majnemer updated this revision to Diff 11789.

Closed by commit rL213692 (authored by @majnemer).