Re: Avoid declaration after statement
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Sep 23, 2009, 09:44 UTC
- Message-ID
- <05f2bea5-0f74-4c89-9a84-d908a80bea20@h30g2000vbr.googlegroups.com>
- In-Reply-To
- <213f3c7799721c3f42ffa689498175f0495048eb.1253088099.git.mstormo@gmail.com>
Show 6 quoted lines
> From: Frank Li <lznuaa@gmail.com> > > MSVC does not understand this C99 style > > Signed-off-by: Frank Li <lznuaa@gmail.com> > Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
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)? See the "/TP" command line option to "CL".
-- Sebastian