From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,700ffaaadd36430b X-Google-Attributes: gidf7344,public X-Google-Thread: 1014db,700ffaaadd36430b X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,700ffaaadd36430b X-Google-Attributes: gid1164f8,public From: bmilton@hookup.net (Bruce Milton) Subject: Re: Problem with RMS structures in DEC C? Date: 1995/06/29 Message-ID: <3suqu3$qc5@noc.tor.hookup.net>#1/1 X-Deja-AN: 105260560 references: organization: Equitable Life of Canada newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c In article , bsspak@bath.ac.uk (P A Keller) wrote: >Hi everyone. Can anyone explain why the following minimal code won't >compile without error under DEC C? VAX C is fine, as well as DEC C with the >/STANDARD=VAXC option. As far as I can see, there is nothing here which >conflicts with the example in the DEC C documentation, or am I just being >dim? > >Thanks, >Peter. > > >#include > >struct FAB infab; >struct XABFHC inxab; > >void func (void) { > > infab = cc$rms_fab; > inxab = cc$rms_xabfhc; > infab.fab$l_xab = &inxab; >} > >produces > > infab.fab$l_xab = &inxab; >....^ >%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value >"&inxab" is "struct xabfhcdef", which is not compatible with "char". >at line number 10 in file DKA100:[USERS.PETER.CIF]RMS.C;5 > >The compiler is DEC C V4.0-000 under OpenVMS AXP V6.1 > >======================================================================== >Peter Keller. \ >Dept. of Biology and \ "It is a pity that people are being killed > Biochemistry, \ by my guns" >University of Bath, \ >Bath, BA2 7AY, UK. \ --- Mikhail Kalashnikov >------------------------------\----------------------------------------- >Tel. (+44/0)1225 826826 x 4302 | Email: P.A.Keller@bath.ac.uk (Internet) >Fax. (+44/0)1225 826449 | P.A.Keller%bath.ac.uk@UKACRL (BITNET) >======================================================================== I'm working with a similar type of DEC structure and this might fix it by infab.fab$l_xab = ( char * )&inxab. FWIW Bruce Milton I/T Consultant Equitable Life of Canada bmilton@hookup.net Disclaimer - These options are strictly my own and have no reflection on my company. ********************************************* Imagination is more important than knowledge. - Albert Einstein *********************************************