Re: [msysGit] Re: Avoid declaration after statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 23, 2009 at 11:44 AM, Sebastian Schuberth
<sschuberth@xxxxxxxxx> wrote:
>
>> From: Frank Li <lznuaa@xxxxxxxxx>
>>
>> MSVC does not understand this C99 style
>>
>> Signed-off-by: Frank Li <lznuaa@xxxxxxxxx>
>> Signed-off-by: Marius Storm-Olsen <mstormo@xxxxxxxxx>
>
> Indeed, even in recent Visual Studio versions the C compiler only
> understands C90, not C99. Would it make sense to just force MSVC to
> compile *.c files with the C++ compiler to fix this, rather than
> patching files (which might be necessary for future files, too)?

I don't think so. There's many other compilers out there that doesn't
support C99 features, and most of the git source code does not depend
on them. IMO, it is better to fix these  issues for all those
compilers once and for all, instead of having to find ways of working
around them whenever someone changes compiler.

Besides, C++ isn't a strict superset of C. There might be warnings or
errors introduced by compiling the code as C++. Implicit conversions
from void* springs to mind. Quick tests reveals that MSVC doesn't seem
to warn or error about them, but there might be some other differences
where we do get into issues.

-- 
Erik "kusma" Faye-Lund
kusmabite@xxxxxxxxx
(+47) 986 59 656
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]