This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: possible gcc bug?


George R Goffe <grgoffe@yahoo.com> writes:

> This error message appears because line 500 of the configure script has an improperly(?) formed if statement: ÂÂÂ 
>
>
> 500ÂÂ if ls -dL / >/dev/null 2>&1; then

This statement is perfectly correct.  It is testing the exit code of
executing the ls command.  Your problem is definitely somewhere else.

> when changed to the following, the message goes away:
>
> 500ÂÂ if [ ls -dL / >/dev/null 2>&1 ]; then

This would be an errorneous use of the test builtin, hidden only due to
fact that stderr is redirected to /dev/null.

$ test ls -dL /
-bash: test: -dL: binary operator expected

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]