From tege@noisy.matematik.su.se  Thu Feb 29 15:28:38 1996
Received: from noisy.matematik.su.se ([130.237.198.146])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA14876
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Feb 1996 14:30:03 -0800 (PST)
Received: (from tege@localhost) by noisy.matematik.su.se (8.6.12/8.6.12) id XAA05612; Thu, 29 Feb 1996 23:27:57 +0100
Message-Id: <199602292227.XAA05612@noisy.matematik.su.se>
Date: Thu, 29 Feb 1996 23:27:57 +0100
From: tege@matematik.su.se
Reply-To: tege@noisy.matematik.su.se
To: FreeBSD-gnats-submit@freebsd.org
Subject: /bin/sh problem with new GCC (snapshot for 2.8)
X-Send-Pr-Version: 3.2

>Number:         1053
>Category:       bin
>Synopsis:       /bin/sh problem with new GCC (snapshot for 2.8)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 29 15:30:02 PST 1996
>Closed-Date:    Sun Mar 10 18:43:12 PST 1996
>Last-Modified:  Sun Mar 10 18:43:32 PST 1996
>Originator:     Torbjorn Granlund
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
TMG Datakonsult
>Environment:
Hardly relevant.

>Description:

The /bin/sh of FreeBSD doesn't work as on other systems, or like bash.
The problem seems to be with the builtin `eval'.

>How-To-Repeat:

bash$ foo=tomte; var=foo; echo `eval echo \\$$var`
tomte
sh$ foo=tomte; var=foo; echo `eval echo \\$$var`
5578var

>Fix:
	
I don't know of any fix that is compatible with a non-flawed sh.  A fix
would be desirable if you want your users that install GCC 2.8 to avoid
problems.  Just imagine the flood of bug reports that you will get...

If you provide me with a (reasonable) fix, I will put it in to the gcc
repository in time for 2.8.
>Release-Note:
>Audit-Trail:

From: Mark Murray <mark@grondar.za>
To: tege@noisy.matematik.su.se
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/1053: /bin/sh problem with new GCC (snapshot for 2.8) 
Date: Fri, 01 Mar 1996 08:42:08 +0200

 > >Description:
 > 
 > The /bin/sh of FreeBSD doesn't work as on other systems, or like bash.
 > The problem seems to be with the builtin `eval'.
 > 
 > >How-To-Repeat:
 > 
 > bash$ foo=tomte; var=foo; echo `eval echo \\$$var`
 > tomte
 > sh$ foo=tomte; var=foo; echo `eval echo \\$$var`
 > 5578var
 
 This is a duplicate (different technique) of my bin/1030.
 
 M
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Sun Mar 10 18:43:12 PST 1996 
State-Changed-Why:  
Duplicate of 1052. 
>Unformatted:
