From owner-freebsd-current@FreeBSD.ORG Tue Apr 16 18:58:58 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C09F383F; Tue, 16 Apr 2013 18:58:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) by mx1.freebsd.org (Postfix) with ESMTP id 7D4A7FA8; Tue, 16 Apr 2013 18:58:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::b037:d3c5:d0df:2e6b] (unknown [IPv6:2001:7b8:3a7:0:b037:d3c5:d0df:2e6b]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EBDC65C44; Tue, 16 Apr 2013 20:58:54 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: CURRENT (r249438): (devel/libiconv)./unistd.h:686:5: error: invalid token at start of a preprocessor expression : #if @GNULIB_EUIDACCESS@ From: Dimitry Andric In-Reply-To: <1URs5b-000B9U-A2@internal.tormail.org> Date: Tue, 16 Apr 2013 20:58:49 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <1365877246.2093.20.camel@thor.walstatt.dyndns.org> <1URs5b-000B9U-A2@internal.tormail.org> To: Jan Beich X-Mailer: Apple Mail (2.1503) Cc: FreeBSD Current , "O. Hartmann" , FreeBSD ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 18:58:58 -0000 On Apr 16, 2013, at 00:42, Jan Beich wrote: > "O. Hartmann" writes: >> ./unistd.h:694:5: error: invalid token at start of a preprocessor >> expression >> #if @GNULIB_EUIDACCESS@ >> ^ >> 1 error generated. > > Maybe -O3 overoptimizes regex in libc e.g., > > $ echo '#if @GNULIB_EUIDACCESS@' | sed 's/@GNULIB_EUIDACCESS@/0/' > #if @GNULIB_EUIDACCESS@ > > $ echo 'aaaaaaaaaaaaaaaaxxxaaaa' | sed 's/aaaaaaaaaaaaxxxaaaa//' > aaaaaaaaaaaaaaaaxxxaaaa How did you arrive at this result? I have recompiled both libc and sed with -O3, but it works just fine here. Maybe -march=native is the clue, so which kind of CPU do you have? To see what CPU llvm detects, try: tblgen -version | grep CPU Note that -O3 turns on clang's vectorizer, so you might have run into an optimizer bug, or some kind of undefined behavior which now falls over. -Dimitry