[Mesa-dev] Mesa (master): mesa: fix compilation

José Fonseca jfonseca at vmware.com
Fri Jan 28 07:46:45 PST 2011


On Thu, 2011-01-27 at 13:07 -0800, Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 01/26/2011 06:16 PM, Zack Rusin wrote:
> > Module: Mesa
> > Branch: master
> > Commit: 59dbdbbb7d0ff90dc7561b1bc337bbb918755103
> > URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59dbdbbb7d0ff90dc7561b1bc337bbb918755103
> > 
> > Author: Zack Rusin <zackr at vmware.com>
> > Date:   Wed Jan 26 21:20:53 2011 -0500
> > 
> > mesa: fix compilation
> > 
> > this isn't c++ please don't mix declerations with code
> 
> I've noticed a lot of these lately.  This used to be prevented by having
> - -std=c89 for the code in "core" Mesa and -std=c99 for the DRI driver
> code.  Something has clearly gone wrong with that.  Does anyone know
> when or why?

-std=c89 is too strict: IIRC it will disable anonymous unions which is
supported by both gcc and msvc and often used in headers.  A -std=msvc
option would be nice though. 

Even better would be c99 support in msvc. Unfortunately MS seems little
very excited about C99, but it is commited to C++0x, which brings some
C99 features [1][2].


Jose

[1] https://connect.microsoft.com/VisualStudio/feedback/details/531634/support-iso-c99-standard?wa=wsignin1.0
[2]  http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx



More information about the mesa-dev mailing list