[Mesa-dev] [PATCH 1/4] mesa: move declarations before code
Jose Fonseca
jfonseca at vmware.com
Thu Jun 27 00:34:07 PDT 2013
----- Original Message -----
> On 06/26/2013 04:33 PM, Eric Anholt wrote:
> > Brian Paul <brianp at vmware.com> writes:
> >
> >> On 06/26/2013 03:56 PM, Ian Romanick wrote:
> >>> Patches 1 and 4 are
> >>>
> >>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> >>>
> >>> For patch 3, I share Jose's concern. I would very much like to see this
> >>> happen in directories containing code that will be built with MSVC.
> >>
> >> Yeah, sounds good, but off-hand I have no idea how to do this
> >> per-directory.
> >
> > Just add it to AM_CPPFLAGS in the directories you care about.
>
> But only if the compiler is gcc, right? Something like:
>
> if GCC
> AM_CPPFLAGS += "-Wdeclaration-after-statement"
> endif
It's probably easier to have a conditional variable in the top .am / .ac,
# Additional flags for cross-platform code
if GCC
XPLATFORM_CFLAGS = "-Wdeclaration-after-statement"
endif
and then unconditionally add on each selected directory
AM_CPPFLAGS += $(XPLATFORM_CFLAGS)
As this will mean less places to modify if we want to modify the flags, or which compilers they apply.
Jose
More information about the mesa-dev
mailing list