Re: CURRENT (r249438): (devel/libiconv)./unistd.h:686:5: error: invalid token at start of a preprocessor expression : #if @GNULIB_EUIDACCESS@

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 16 Apr 2013 20:58:49 +0200
On Apr 16, 2013, at 00:42, Jan Beich <jbeich_at_tormail.org> wrote:
> "O. Hartmann" <ohartman_at_zedat.fu-berlin.de> writes:
>> ./unistd.h:694:5: error: invalid token at start of a preprocessor
>> expression
>> #if _at_GNULIB_EUIDACCESS_at_
>>    ^
>> 1 error generated.
> 
> Maybe -O3 overoptimizes regex in libc e.g.,
> 
> $ echo '#if _at_GNULIB_EUIDACCESS_at_' | sed 's/_at_GNULIB_EUIDACCESS_at_/0/'
> #if _at_GNULIB_EUIDACCESS_at_
> 
> $ 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
Received on Tue Apr 16 2013 - 16:58:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:36 UTC