Article View: gnu.gcc.bug
Article #6237casting problem II
From: Peter A. Buhr
Date: Thu, 18 Jan 1996 00:00
Date: Thu, 18 Jan 1996 00:00
15 lines
759 bytes
759 bytes
Sorry, I had the wrong cast. Here is the corrected program. Sorry again.
int j(int,float) {}
int k(int,int) {}
int main() {
int (*f)(int,float) = j;
int x;
float y;
(int)y = x; /* examples of casting on the left */
(float)x = y;
f = (int (*)(int,float))k;
(int (*)(int,int))f = k; /* now it works */
}
Technical Details
Message-ID:
<199601190208.VAA17918@plg.uwaterloo.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,551668a848846006,start X-Google-Attributes: gid113d02,public From: pabuhr@plg.uwaterloo.ca (Peter A. Buhr) Subject: casting problem II Date: 1996/01/18 Message-ID: <199601190208.VAA17918@plg.uwaterloo.ca> X-Deja-AN: 135713676 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.bug