#647: [PATCH] src/call/pcc.c compile on hpux
----------------------+-----------------------------------------------------
 Reporter:  rrauenza  |       Owner:  Infinoid
     Type:  patch     |      Status:  new     
 Priority:  normal    |   Milestone:          
Component:  none      |     Version:          
 Severity:  medium    |    Keywords:          
     Lang:            |       Patch:          
 Platform:            |  
----------------------+-----------------------------------------------------

Comment(by rrauenza):

 {{{
 int _ASSERT_ARGS_CHECK = ((interp) ? (0) : (Parrot_confess("interp",
 "src/call/pcc.c", 2475), 0))
      || ((ctx) ? (0) : (Parrot_confess("ctx", "src/call/pcc.c", 2475), 0))
      || ((indexes) ? (0) : (Parrot_confess("indexes", "src/call/pcc.c",
 2475), 0))
      || ((ret_x) ? (0) : (Parrot_confess("ret_x", "src/call/pcc.c", 2475),
 0))
      || ((returns) ? (0) : (Parrot_confess("returns", "src/call/pcc.c",
 2475), 0)) ;

 }}}

 Looks like va_list is pretty opaque..

 bar3.c is the -E version:

 {{{
 $ grep va_list bar3.c
   typedef __va_list__ __va_list;
   typedef __va_list__ va_list;
 }}}

 The default #defines for the HP compiler are

 {{{
 [email protected] $ cc -v foo.c
  /opt/aCC/lbin/ecom -architecture 32 -ia64abi all -ext on -lang c
 -exception off
 -sysdir /usr/include -inline_power 1 -link_type dynamic -fpeval float
 -fpevaldec
 _Decimal32 -tls_dyn on -target_os 11.23 --sys_include /usr/include
 -D_BIND_LIBCALLS
 -D_Math_errhandling=MATH_ERREXCEPT -D__hpux -D__unix -D__ia64=1
 -D__ia64__=1
 -D_BIG_ENDIAN=1 -D_ILP32 -D__HP_cc=62000 -D__STDC_EXT__ -D_HPUX_SOURCE
 -D_INCLUDE_LONGLONG -D_INLINE_ASM -D_FLT_EVAL_METHOD=0
 -D_DEC_EVAL_METHOD=0 -ucode
 hdriver=optlevel%1% -plusolistoption -Ol06all! -plusolistoption
 -Ol13moderate!
 -plusooption
 
-Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,Qs,do,ib,pl,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If!
 foo.c
 }}}

 The one you probably want to use is:

 {{{
 -D__HP_cc
 }}}

 The only compilation problem I've seen is with the asserting of the
 va_list.   And only in that one function.   There are lots of other parrot
 functions that take a va_list that isn't asserted in that file.

 Only other thing to mention is that by default we are not C99 compliant,
 but there are compiler options to turn that on.    Not really relevant for
 this error though.

 Rich

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/647#comment:6>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to