[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] Building TOR using Visual Studio



teor wrote:

> I just looked over this patch and it looks safe and simple to commit
> (haven't have a chance to compile it yet though).
> The correct order of declaration, asserts, and initialisation /
> assignment has been preserved in the code.
> 
> If we commit this patch, we should probably change the C standard compiler
> flags to in the autoconf scripts to C89 as well. (Do we set those?)
> 
> This would stop any more C99 sneaking in...

The vast majority of Vladimir's patch was fix something call Mixed Declarations
eg:

      int i = 0 ;
      printf ("%d\n", i) ;
      int j = 1 ;

You can disallow these mixed declarations in C99 code using -Wdeclaration-after-statement
which is probably better than downgrading everything to C89 for comaptibilty
with one compiler.

People should also be aware than even though VS2013 claims some C99 compatibility
my recollection is that it still does not provide a standards conforming snprintf
implementation.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev