Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!haven!umd5!astro.UMD.EDU!jjk From: jjk@astro.UMD.EDU (Jim Klavetter) Newsgroups: comp.lang.c Subject: is this really an illigal combination? Summary: illegal combination warning with Keywords: illegal combination Message-ID: <5947@umd5.umd.edu> Date: 15 Jan 90 06:04:58 GMT Sender: news@umd5.umd.edu Reply-To: jjk@astro.UMD.EDU Distribution: na Organization: University of Maryland, Astronomy Lines: 34 With the following declarations: char *nam, *pstring; I get an warning message with the following line of code: if(NULL==(pstring=strrchr(nam, '.')) || strcmp(pstring,".imh")) The warning from my compiler is "imropen.c", line 17: warning: illegal combination of pointer and integer, op = Everything works as I expect. Furthermore, this code is analagous to code I found in the book TOPICS IN C PROGRAMMING by Kochan and Wood. Note that I have isolated the warning to the fragment pstring=strrchr(f77nam, '.'); and I HAVE included as the manual indicates. If I include , however (not indicated by the man page), I do not get the warning message. In there is extern char *strrchr(); not in . So the real question is: is there a bug in or the man page or my code or my compiler? I am on a sun 3/50 running 4.0.3. E-mail replies since and I will post if there is a definitive answer. jjk@astro.umd.edu