On Wed, Sep 9, 2009 at 4:36 PM, Greg Comeau<[email protected]> wrote: > In article <[email protected]>, > Fernan Bolando <[email protected]> wrote: >>...error: initializer is not a constant: F0_Prelude_46primLeave >>--h file --- >>#define VAP_TAG 1 >>#define WORDSHIFT 5 >>#define WORDSIZE (1<<WORDSHIFT) >>#define WORDMASK (WORDSIZE-1) >>#define NS (WORDSIZE>>3) >>#define ZAP_BIT (1L<<(WORDSIZE-1)) >>-- c file ---- >>unsigned F0_Prelude_46primLeave[] = { >> CAPTAG(FN_Prelude_46primLeave,1) >>#ifdef PROFILE >>, useLabel(PROF_primLeave) >>, 0 >>, 0 >>, 0 >>#endif > > The initializers to some things need to be constants. > In your case, it appears that either CAPTAG or useLabel (or both) > have ended up not being #define'd. Probably the header they are > #define'd in is not being #include'd (you don't show it above, > but then you don't show enough of your code to even reproduce it). > > On a relate note, you can see the results of preprocessing > from pcc by using the -E and/or -P options, that way you > can see whether the macro ended up getting substituted > and what it was substituted to -- or not in your case. > Some compilers also have options which will emit the trail of > files #include'd but I don't see that option for pcc.
gcc happily compiles a definition like #define CT_v249 ((void*)startLabel+464) is it valid just to add to make the porting non-destructive? #ifdef Plan9 #define void unsigned char #endif -- http://www.fernski.com
