🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #818

Re: Function pointer casting

#818
From: MW Ron
Date: Mon, 02 Jun 2003 12:50
21 lines
1830 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).

These type of conversions are illegal, actually even the explicit
conversion is illegal.   However it seems to be common practice to do 
this so we allowed the explicit casts 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-9D6DF1.08503202062003@enews.newsguy.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
References: <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 06:20:02 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!pln-e!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 08:50:32 -0400
Organization: Metrowerks
Lines: 21
Message-ID: <mwron-9D6DF1.08503202062003@enews.newsguy.com>
References: <3ED6734A.6080600@lgl.kos.net>
NNTP-Posting-Host: p-621.newsdawg.com
Posted-And-Mailed: yes
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^$