From 7757c787c46f10e9276a4eef51b897fe6f6e9e23 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 14 Apr 2017 07:22:02 +0000 Subject: [PATCH] Define __dead and __pure even if __STRICT_ANSI__ for compilers that support GCC's __attribute__ syntax. Fixes several warnings when compiling code with clang with -std=c++11 or some other strict ISO standard. ok millert@, guenther@ --- sys/sys/cdefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 5ecfff741e9..8c0e7fbe6c0 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdefs.h,v 1.40 2017/01/06 14:22:30 kettenis Exp $ */ +/* $OpenBSD: cdefs.h,v 1.41 2017/04/14 07:22:02 kettenis Exp $ */ /* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */ /* @@ -102,7 +102,7 @@ #define __dead __volatile #define __pure __const #endif -#elif !defined(__STRICT_ANSI__) +#else #define __dead __attribute__((__noreturn__)) #define __pure __attribute__((__const__)) #endif -- 2.20.1