On 03/09/13 00:08, David Woodhouse wrote:
> On Fri, 2013-03-08 at 14:59 -0800, Andrew Fish wrote:
>>
>> David I'm with you on this, and I would point to the behavior of
>> modern compilers (as our examples on the list show) follow the C99
>> definition of undefined behavior. 
>>
>> It is my understanding that MSVC does not fully support C99, just a
>> subset of features.
> 
> Oh, wow. I concede I don't really follow the Windows world very much and
> haven't done for years — the pollution of EDK2 with Windowsisms is the
> closest I've had the misfortune to get.

If you tried to compile most of the FLOSS corpus, generally available on
any widespread GNU/Linux distro, on a certified SUSv3 platform
<http://www.opengroup.org/openbrand/register/>, you'd be surprised by
the amount of GNU/Linuxisms. One can be thankful when a developer team
at least realises the problem and delegates the solution, if not to the
standard, then at least to portability libraries like Gnulib.

> I didn't realise MSVC was such a substandard compiler. If that's really
> the case then I suppose we're kind of stuck. We can't necessarily expect
> everyone to upgrade to a saner build platform.

Development of that compiler is probably driven by commercial interests,
presumably at least partially reflecting the user base's demands.

> In that case we should definitely use appropriate -std arguments on more
> modern toolchains though, to make them enforce the use of anachronistic
> code. Writing code targeted at C standard which was obsoleted 14 years
> ago is definitely *not* going to come naturally to a lot of people.

It would be a patch for edk2-buildtools I think. What causes me the most
headache however is the different set of fatal warnings between MSVC and
gcc. Warnings sometimes catch intentional & valid code, and I can't
build on MSVC before submitting.

Laszlo

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to