> C can't cast from type A to type B. There is only the possibility to > cast every shit to type B. And this is dangerous. > So you write a > > int ifreq; > double dfreq; > ifreq = (int) ( dfreq ); > > and now dfreq changes the type to 'struct bla*'. > C converts this without batting an eyelid. ...but doing anything different from address arithmetic won't compile. So if you do anything useful with dfreq, the compiler will catch the error; if you don't do anything useful with it, then a) you don't do _anything_ with it, so no worries, mate or b) it is only part of an API interface, so it's types should be well defined and documented. The example of the X11 problem you give, is typical of X11, and not so much of C typecasts, IMHO. The example X11 implementation is full of evil ineteger <-> pointer conversions. Ciao, Segher -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
- [MP3 ENCODER] Please stop breaking LAME... ;) Sigbjørn Skjæret
- Re: [MP3 ENCODER] Please stop breaking LAME... ;) Steve Lhomme
- Re: [MP3 ENCODER] Please stop breaking LAME... ;) Frank Klemm
- [MP3 ENCODER] Heavy problems with lame source ... Frank Klemm
- Re: [MP3 ENCODER] Please stop breaking LAME...... Sigbjørn Skjæret
- Re: [MP3 ENCODER] Please stop breaking LAM... Frank Klemm
- Re: [MP3 ENCODER] Please stop breaking... Sigbjørn Skjæret
- Re: [MP3 ENCODER] Please stop bre... Frank Klemm
- Re: [MP3 ENCODER] Please stop... Alberto García
- [MP3 ENCODER] Please test byte order h... Segher Boessenkool
- [MP3 ENCODER] Please test byte order handl... Frank Klemm
- Re: [MP3 ENCODER] Please stop breaking LAM... Zia Mazhar
- Re: [MP3 ENCODER] Please stop breaking... Sigbjørn Skjæret
- Re: [MP3 ENCODER] Please stop bre... Joshua Bahnsen
- Re: [MP3 ENCODER] Please stop... Sigbjørn Skjæret
- Re: [MP3 ENCODER] Please stop breaking... Mark Taylor
- Re: [MP3 ENCODER] Please stop bre... Frank Klemm
- Re: [MP3 ENCODER] Please stop bre... Jason Antony
- RE: [MP3 ENCODER] Please stop breaking LAME... ;) Mathew Hendry