Article View: comp.sys.mac.programmer.codewarrior
Article #819Re: Function pointer casting
From: MW Ron
Date: Mon, 02 Jun 2003 13:41
Date: Mon, 02 Jun 2003 13:41
20 lines
1730 bytes
1730 bytes
In article <3ED6734A.6080600@lgl.kos.net>,
Edward Chew <ekc-noreply@lgl.kos.net> wrote:
>After upgrading to CW 8, I notice the compiler no longer allows implicit
>casting from function pointers (e.g. "int (*)()") to void*. Is this a
>bug or some weird C/C++ standards compliance thing? For now, it seems
>happy if I write static_cast<void*>(fn).
This is not legal implicitly or explicitly but we allow the explicit
cast because this is common for legacy code.
Ron
--
Get printed CodeWarrior Documentation (limited selection)
And all the latest versions of CodeWarrior Manuals
http://www.metrowerks.com/MW/Support/dev_resources/default.htm
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Technical Details
Message-ID:
<mwron-5286CB.09413702062003@enews.newsguy.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwronReferences:
<3ED6734A.6080600@lgl.kos.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,9c35d45628066e65
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,9c35d45628066e65
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2003-06-02 07:05:12 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
From: MW Ron <mwron@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: Function pointer casting
Date: Mon, 02 Jun 2003 09:41:37 -0400
Organization: Metrowerks
Lines: 20
Message-ID: <mwron-5286CB.09413702062003@enews.newsguy.com>
References: <3ED6734A.6080600@lgl.kos.net>
NNTP-Posting-Host: p-038.newsdawg.com
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
(%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
@L/q,TjMd5+H{gASEPDR^$