Path: utzoo!mnetor!uunet!husc6!bbn!rochester!ur-tut!sunybcs!boulder!tramp!swarbric From: swarbric@tramp.Colorado.EDU (Frank Swarbrick) Newsgroups: comp.lang.c Subject: Re: noalias comments to X3J11 Message-ID: <4993@sigi.Colorado.EDU> Date: 22 Mar 88 01:22:24 GMT References: <7753@alice.UUCP> Sender: news@sigi.Colorado.EDU Reply-To: swarbric@tramp.Colorado.EDU (Frank Swarbrick) Organization: University of Colorado, Boulder Lines: 19 What does this const thing have to do with the function below getting the suspicious pointer conversion warning? int pos(const char *str,char c) { char *s; s = strchr(str,c); return s ? (int)(s - str) : -1; } This, of course, works if I take out the const thing. Is this one of the things that you were complaining about, or should this just plain not work? (This was done in Turbo C 1.5, by the way.) Frank Swarbrick (and his cat) swarbric@tramp.UUCP swarbric@tramp.Colorado.EDU ...!{ncar|nbires}!boulder!tramp!swarbric "Welcome back my friends to the show that never ends..."