[PATCH 5/5] Limit the scope of gasidx in add_plan_to_notes

Lubomir I. Ivanov neolit123 at gmail.com
Fri Jul 11 06:04:52 PDT 2014


On 11 July 2014 14:55, Anton Lundin <glance at acc.umu.se> wrote:
> On 11 July, 2014 - Lubomir I. Ivanov wrote:
>
>> On 11 July 2014 10:13, Anton Lundin <glance at acc.umu.se> wrote:
>> > glance> for (int i=0;i<3;i++) ?
>>
>> for that to work on older versions e.g. MSVC 2003, /Tp has to be used
>> (like jeff mentioned, we can mark the input to be C++) and then extern
>> "C" wrapping would be needed to preserve the binary interface.
>>
>> on even older versions like MSVC 1998, /Tp exists but the actual
>> intermix feature from c99 is a bit messed up. the lexical scanner does
>> recognize it, but then it assigns a non-local scope to the iterator.
>> so you can do things like:
>>
>> for (int i = 0; i < 10; i++)
>>     puts("stuff");
>> i = 0; // <---
>>
>> i would advice against this particular feature if targeting older
>> MSVC, but for third party source projects i usually follow their usage
>> of "for" loops.
>> for my own managed projects, this:
>>
>> int i = 0;
>> while (i < ...) {... i++ }
>>
>> remained as a habit.
>>
>
> Msvc 2013 seems to get it right, and i can gladly argue that we
> shouldn't support any older Msvc's just for the sake of it.
>
> How many do actually build subsurface for windows? You, Dirk and maybe 1
> 2 other dev's, but thats probably it. Dirk uses mingw, and you would
> know to use msvc 2013, so it doesn't feel like a show stopper for me =)
>
> But, if we as always, if we know that things break with older msvc's we
> should document it.
>

well, my opinion is that mingw is sufficient of a complier for windows
and in the case of subsurface.
MSVC support would be a time consuming exercise with no real benefits.

lubomir
--


More information about the subsurface mailing list