From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 7 13:50:07 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8560BD2; Fri, 7 Feb 2014 13:50:07 +0000 (UTC) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 7FDEE1E22; Fri, 7 Feb 2014 13:50:07 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:cc06:8a07:85a3:8279]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 83DF04AC1C; Fri, 7 Feb 2014 17:50:05 +0400 (MSK) Date: Fri, 7 Feb 2014 17:49:57 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <717736061.20140207174957@serebryakov.spb.ru> To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Subject: Why clang bundled with 10-RELEASE doesn't define __has_feature(cxx_nullptr)? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 13:50:07 -0000 Hello, freebsd-stable. Why __has_feature(cxx_nulptr) doesn't work on system compiler? nullptr itself works! Here is sample program: ============================= test.cxx #include #ifndef __has_feature #warning "Doesn't support for __has_feature at all" #define __has_feature(x) 0 #endif #if __has_feature(cxx_nullptr) #warning "Has nullptr" #else #warning "Doesn't have nullptr" #endif int main(int argn, char *argv[]) { void *v = nullptr; return 0; } ====================================== > c++ --version FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd10.0 Thread model: posix > c++ test.cxx test.cxx:11:2: warning: "Doesn't have nullptr" [-W#warnings] #warning "Doesn't have nullptr" ^ 1 warning generated. > -- // Black Lion AKA Lev Serebryakov