Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] (PR#15158) __extension__ keyword in gui-sdl
Home

[Freeciv-Dev] (PR#15158) __extension__ keyword in gui-sdl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#15158) __extension__ keyword in gui-sdl
From: "Christian Prochaska" <cp.ml.freeciv.dev@xxxxxxxxxxxxxx>
Date: Sat, 14 Jan 2006 06:03:49 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15158 >

I found the following code pieces in gui-sdl and don't understand why
the __extension__ keyword is being used. When I remove it and compile
with "-pedantic" no additional warning appears, but maybe this has
nothing to do with it. Can somebody please explain it to me?


/* Want to use GCC's __extension__ keyword to macros , use it */
#if defined(__GNUC__)
#define fc__extension(x)        (__extension__(x))
#else
#define fc__extension(x)        (x)
#endif


#define scrollbar_size(pScroll)                                         \
  fc__extension((float)((float)(pScroll->active * pScroll->step) /      \
                (float)pScroll->count) * (pScroll->max - pScroll->min))

#define get_wstate(pWidget)                             \
        fc__extension((enum WState)(pWidget->state_types_flags & STATE_MASK))

#define get_wtype(pWidget)                              \
        fc__extension((enum WTypes)(pWidget->state_types_flags & TYPE_MASK))

#define get_wflags(pWidget)                             \
        fc__extension((enum WFlags)(pWidget->state_types_flags & FLAG_MASK))




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15158) __extension__ keyword in gui-sdl, Christian Prochaska <=