Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 20:58:49 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Jan Beich <jbeich@tormail.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, "O. Hartmann" <ohartman@zedat.fu-berlin.de>, FreeBSD ports <freebsd-ports@freebsd.org>
Subject:   Re: CURRENT (r249438): (devel/libiconv)./unistd.h:686:5: error: invalid token at start of a preprocessor expression : #if @GNULIB_EUIDACCESS@
Message-ID:  <E15F2208-0A57-4C40-B7B0-FEA7953500AD@FreeBSD.org>
In-Reply-To: <1URs5b-000B9U-A2@internal.tormail.org>
References:  <1365877246.2093.20.camel@thor.walstatt.dyndns.org> <1URs5b-000B9U-A2@internal.tormail.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 16, 2013, at 00:42, Jan Beich <jbeich@tormail.org> wrote:
> "O. Hartmann" <ohartman@zedat.fu-berlin.de> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E15F2208-0A57-4C40-B7B0-FEA7953500AD>