tech-toolchain archive

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

-std=gnu99



Hi

I mean to change bsd.sys.mk to always provide -std=gnu99 in CFLAGS as per
below patch, as if the code base requires gnu99 then it will require it
whichever compiler is in use.

(not to mention, that the conditional is wrong)

but, what should the comment say?

regards,
iain

Index: bsd.sys.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.sys.mk,v
retrieving revision 1.237
diff -u -p -r1.237 bsd.sys.mk
--- bsd.sys.mk  28 Jan 2014 19:41:52 -0000      1.237
+++ bsd.sys.mk  16 May 2014 19:57:29 -0000
@@ -20,12 +20,10 @@ CPPFLAGS+=  -Wp,-iremap,${DESTDIR}/:/
 CPPFLAGS+=     -Wp,-iremap,${X11SRCDIR}:/usr/xsrc
 .endif

-# Enable c99 mode by default.
+# Enable gnu99 mode by default.
 # This has the side effect of complaining for missing prototypes
 # implicit type declarations and missing return statements.
-.if defined(HAVE_GCC) || defined(HAVE_LLVM)
 CFLAGS+=       -std=gnu99
-.endif

 .if defined(WARNS)
 CFLAGS+=       ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign 
:}


Home | Main Index | Thread Index | Old Index