kern/159279: [PATCH] __FreeBSD_cc_version in <sys/cdefs.h>

Robert Millan rmh at
Thu Jul 28 23:30:10 UTC 2011

>Number:         159279
>Category:       kern
>Synopsis:       [PATCH] __FreeBSD_cc_version in <sys/cdefs.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 28 23:30:09 UTC 2011
>Originator:     Robert Millan
>Release:        Debian GNU/kFreeBSD "sid"
This patch fixes a (harmless) warning when <sys/cdefs.h> is parsed by
upstream version of GCC.

See also:



Patch attached with submission follows:

Index: sys/sys/cdefs.h
--- sys/sys/cdefs.h	(revision 223736)
+++ sys/sys/cdefs.h	(working copy)
@@ -349,7 +349,7 @@
 /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
-#if __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
 #define	__printf0like(fmtarg, firstvararg) \
 	    __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))


More information about the freebsd-bugs mailing list