This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1000299] New: Thread Creation Example Utilizes Incorrect Cast
- From: bugzilla-daemon at ecoscentric dot com
- To: ecos-bugs at sources dot redhat dot com
- Date: Thu, 17 Aug 2006 20:48:03 +0100 (BST)
- Subject: [Bug 1000299] New: Thread Creation Example Utilizes Incorrect Cast
http://bugzilla.ecoscentric.com/show_bug.cgi?id=1000299
Summary: Thread Creation Example Utilizes Incorrect Cast
Product: eCos
Version: unknown
Platform: mxlads_a (Motorola M9328MXLADS/A board)
URL: http://ecos.sourceware.org/docs-latest/ref/kernel-
thread-create.html
OS/Version: ARM
Status: UNCONFIRMED
Severity: normal
Priority: normal
Component: Reference Guide
AssignedTo: jifl@ecoscentric.com
ReportedBy: Tony.Garland@fluke.com
QAContact: ecos-bugs@sources.redhat.com
The example code under "Thread Entry Points and C++" does not compile on gcc
because it shows a static_cast where a reinterpret_cast is required.
This snippet:
cyg_thread_create( ...,
&fred::static_thread_aux,
static_cast<cyg_addrword_t>(&instance),
...);
Should be:
cyg_thread_create( ...,
&fred::static_thread_aux,
reinterpret_cast<cyg_addrword_t>(&instance),
...);
static_cast cannot be used to change a pointer (&instance) into a non-pointer
(cyg_addrword_t which is unsigned int on our platform).
--
Configure bugmail: http://bugzilla.ecoscentric.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.