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

Anton Lundin glance at acc.umu.se
Fri Jul 11 00:13:20 PDT 2014


On 11 July, 2014 - Jef Driesen wrote:

> On 2014-07-10 22:36, Dirk Hohndel wrote:
> >On Thu, Jul 10, 2014 at 10:34:24PM +0200, Anton Lundin wrote:
> >>On 10 July, 2014 - Dirk Hohndel wrote:
> >>>IIRC we don't want to use this in C files because some older C
> >>>compilers
> >>>throw up with it...
> >>>
> >>
> >>I checked, and we already do, for windows atleast =)
> >>
> >>windows.c:		for (int i = 0; i < len; i++)
> >
> >He. And here I thought it was MSVC that had problems with it...
> >Since clang on Apple and both gcc and clang on Linux are fine, I guess
> >I'll take the patch :-)
> 
> I don't know about the latests versions of msvc, but msvc doesn't support
> most C99 features. However, in C++ mode many of them are supported. And
> that's exactly the trick I use for libdivecomputer: build the C code with
> C++ compiler. There are just a few things you have to be aware of that are
> supported in C but not C++ (for example casting from void pointer to another
> pointer type requires an explicit cast).
> 
> Actually, I always use mingw as cross compiler from linux, but I do make
> sure the code can be compiled with msvc, for those Windows developers that
> prefer msvc :-)
> 

I just checked with a friend of mine who had msvc 2013 installed
already:

glance> for (int i=0;i<3;i++) ?
zao> ========== Build: 2 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========


I also found http://rise4fun.com/Vcc and http://rise4fun.com/vcpp where
you can web-compile with those compilers and test things.


This is going to make lots of cleanup possible =)


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list