[haiku-development] Re: GCC 2.95 and certain #define macros

  • From: "Duane Ryan" <bailey.d.r@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 21 Aug 2007 12:53:25 -0400

hey, I'm sure the webkit folks would love it if you ported their code
to 2.95...but only if it also compiles for 4.3 or whatever. Or, you
could just maintain a downstream 2.95/haiku patch. Personally, I'd
recommend the latter, because it means less hassle overall, and
perhaps easier porting once R2 comes around.

On 8/21/07, Ryan Leavengood <leavengood@xxxxxxxxx> wrote:
> On 8/21/07, Philippe Houdoin <philippe.houdoin@xxxxxxx> wrote:
> >
> > Did you try to simplify this silly macro to this:
> >
> > #define PLATFORM(WTF_FEATURE) WTF_PLATFORM_##WTF_FEATURE
> >
> > According to #if preprocessing directive specification, any undefined 
> > identifier
> > will be evaluated as 0.
> >
> > Which means "#if PLATFORM(DARWIN)" will give "#if WTF_PLATFORM_DARWIN" 
> > which,
> > logically, should be evaluated to zero if such identifier is undefined.
> >
> > I failed to see why someone defining a macro as an expression will ever 
> > needs to
> > check if an identifier is defined before evaluating its value, as 0 is 
> > specified
> > as the default value for any undefined identifier...
> >
> > Anyway, maybe it worth a try.
>
> You are right, based on what I've been reading. I agree it is kind of
> silly and will investigate making this change tonight. Maybe all this
> discussion about GCC 2.95.3 versus GCC 4 will be moot if the changes
> needed actually FIX the WebKit code like the above :)
>
> Ryan
>
>

Other related posts: