Building the kernel with clang 3.9.0 produces the following new warnings
in drm2:
In file included from sys/dev/drm2/radeon/radeon_agp.c:31:
sys/dev/drm2/drmP.h:1141:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if __OS_HAS_AGP
^
sys/dev/drm2/drmP.h:106:23: note: expanded from macro '__OS_HAS_AGP'
#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
^
sys/dev/drm2/drmP.h:1141:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
sys/dev/drm2/drmP.h:106:47: note: expanded from macro '__OS_HAS_AGP'
#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
^Instead of defining __OS_HAS_AGP in this way, use the more portable way
of:
#if <condition> #define __OS_HAS_AGP 1 #else #define __OS_HAS_AGP 0 #endif