From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,db6607f7c58f102b,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-04-27 09:33:46 PST Newsgroups: comp.sys.dec Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!nih-csl!freud.nia.nih.gov!howardy From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung) Subject: problem with the risc c compiler on DEC Message-ID: <1993Apr27.162518.10123@alw.nih.gov> Sender: postman@alw.nih.gov (AMDS Postmaster) Organization: (Natl. Institutes of Health, Bethesda, MD) Date: Tue, 27 Apr 1993 16:25:18 GMT I compile a c program using a SGI ansi c compiler and a DEC risc c compiler. I my program, I have the following statements: ~ ~ #include #include #include #include ~ ~ caddr_t inmapped=NULL; caddr_t outmapped=NULL; outmapped=mmap((caddr_t)0,(dimx*dimy*dimz*bits)-1, PROT_READ|PROT_WRITE , MAP_SHARED, fd, (off_t)0); ~ ~ inmapped=mmap((caddr_t)0, (dimx*dimy*dimz*bits)-1 , PROT_READ , MAP_SHARED , fd, (off_t)0); ~ ~ dimx, dimy, dimz and bits are integers. On the SGI c compiler, the compling is OK. But on the DEC compiler, I get the following warning message: ccom: Warning: genimg.c, line 184: illegal combination of pointer and integer, op = outmapped=mmap((caddr_t)0,(dimx*dimy*dimz*bits)-1, 0x1 |0x2 , 1 , fd, (off_t)0); ------------------------------------------------------------------------------------------------ -----------------^ ccom: Warning: genimg.c, line 218: illegal combination of pointer and integer, op = inmapped=mmap((caddr_t)0, (dimx*dimy*dimz*bits)-1 , 0x1 , 1 , fd, (off_t) 0); ------------------------------------------------------------------------------------------------ --^ My program doesn't run on DEC. Do anyone know why? If you like the whole copy of the program, I will more than glad to send you one. It has about 200 lines of code. Howard.