Date: Wed, 30 Dec 2015 17:44:49 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: David Chisnall <theraven@FreeBSD.org> Cc: Bruce Evans <brde@optusnet.com.au>, John Baldwin <jhb@FreeBSD.org>, Warner Losh <imp@bsdimp.com>, src-committers <src-committers@FreeBSD.org>, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Warner Losh <imp@FreeBSD.org> Subject: Re: svn commit: r292809 - head/lib/libc/stdio Message-ID: <20151230172556.R2352@besplex.bde.org> In-Reply-To: <12F59E6B-137C-4B53-B86C-E111E512CCFF@FreeBSD.org> References: <201512272304.tBRN4C5D034464@repo.freebsd.org> <41508412.yspAtSoPCD@ralph.baldwin.cx> <CANCZdfq4sMAEzJ-wxNnybJiiTnJV3k5NZgcQACnchHCgpKQxrQ@mail.gmail.com> <2345870.SHMMVrpc1D@ralph.baldwin.cx> <20151230102454.P1079@besplex.bde.org> <12F59E6B-137C-4B53-B86C-E111E512CCFF@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Dec 2015, David Chisnall wrote: > On 30 Dec 2015, at 00:48, Bruce Evans <brde@optusnet.com.au> wrote: >> >> - C++ apparently spells this as both _Alignof() and alignof() after 2011= /03 > > This is not correct. C++ spells it alignof. C spells it _Alignof, unles= s you include <stdalign.h>, in which case C spells it alignof and defines _= _alignof_is_defined. > > On FreeBSD, we define _Alignof in C++ mode, because it=E2=80=99s in the r= eserved identifier space and gives us something that works in C and C++. So it is more broken than first appeared :-). Extra spellings are a bug since users don't know which one to use and prefer the worst one unless they are experts in at least 3 versions of 3 standards (C-K&R, C90, C99, C11, C++-mumble, gnu89, gnu99, gnu11) and FreeBSD variations on these. There are also syntactical problems. stdalign.h uses _Alignas and _Alignof= , but FreeBSD only defines _Alignas(x) and _Alignof(x). The former is becaus= e alignof is like sizeof so it doesn't need parentheses. However, alignof(typename) needs the parentheses and 'alignof expression' is=20 apparently only a gnu extension, so it is difficult to construct an example of Standard code without the parentheses. _Alignas is more broken than _Alignof. In the C case, _Alignas(x) is as __aligned(x), but this only works if x is an expression. __aligned(x) is often used in FreeBSD code, but the same code in C++ with __aligned(x) replaced by alignas(x) with any spelling is a syntax error. Bruce From owner-svn-src-head@freebsd.org Wed Dec 30 09:15:04 2015 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34BDEA563EC; Wed, 30 Dec 2015 09:15:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A1CE1068; Wed, 30 Dec 2015 09:15:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBU9F34L001704; Wed, 30 Dec 2015 09:15:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBU9F3LM001703; Wed, 30 Dec 2015 09:15:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201512300915.tBU9F3LM001703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric <dim@FreeBSD.org> Date: Wed, 30 Dec 2015 09:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292911 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 30 Dec 2015 09:15:04 -0000 Author: dim Date: Wed Dec 30 09:15:02 2015 New Revision: 292911 URL: https://svnweb.freebsd.org/changeset/base/292911 Log: Add some more obsolete files, left over from the clang 3.7.0 -> 3.7.1 upgrade. Noticed by: Nikolai Lifanov <lifanov@mail.lifanov.com>, jtl Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Dec 30 09:02:03 2015 (r292910) +++ head/ObsoleteFiles.inc Wed Dec 30 09:15:02 2015 (r292911) @@ -105,6 +105,8 @@ OLD_FILES+=usr/lib/clang/3.7.0/include/x OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h OLD_DIRS+=usr/lib/clang/3.7.0/include OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151230172556.R2352>