X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: ABCD <en.ABCD@gmail.com>
Subject:  Re: gcc4: cc
Date:  Wed, 18 Mar 2009 16:47:25 -0400
Lines: 76
Message-ID: <gprmle$9u9$1@ger.gmane.org>
References:  <49C0467A.1080404@users.sourceforge.net> <49C07906.2060504@gmail.com> <49C07E09.5070909@users.sourceforge.net> <49C0E323.9000109@byu.net>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 2.0.0.19 (X11/20090106)
In-Reply-To: <49C0E323.9000109@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Blake wrote:
> According to Yaakov (Cygwin/X) on 3/17/2009 10:52 PM:
>> Dave Korn wrote:
>>>   Ah, thanks for pointing this out.  (The packages are of course broken as far
>>> as portability is concerned, as upstream GCC does not anywhere provide a 'cc'
>>> executable; it's presence in the gcc-3 package is caused by the build script
>>> creating a symlink as a convenience, so it's wrong in general to assume that
>>> there "must be" an executable called 'cc' in the PATH.)  I'll add it back into
>>> the next release.
>> Actually, SUSv2 requires a cc and c89; SUSv3 mentions only a c99.
> 
> So it would be nice to have all three names.  And perhaps c89 (but not the
> others) should imply --std=gnu89.
> 

Just as a point of reference, Gentoo Linux provides c89 and c99 as shell
scripts, which contain the following:

- ----- 8< ----- /usr/bin/c89 ----- 8< -----
#! /bin/sh

# Call the appropriate C compiler with options to accept ANSI/ISO C
# The following options are the same (as of gcc-2.95):
# 	-ansi
# 	-std=c89
# 	-std=iso9899:1990

for i; do
    case "$i" in
	-ansi|-std=c89|-std=iso9899:1990)
	    ;;
	-std=*)
	    echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i"
	    exit 1
	    ;;
    esac
done

exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@"
- ----- 8< ----- /usr/bin/c99 ----- 8< -----
#! /bin/sh

# Call the appropriate C compiler with options to accept ANSI/ISO C
# The following options are the same (as of gcc-3.3):
# 	-std=c99
# 	-std=c9x
# 	-std=iso9899:1999
# 	-std=iso9899:199x

for i; do
    case "$i" in
	-std=c9[9x]|-std=iso9899:199[9x])
	    ;;
	-ansi|-std=*)
	    echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i"
	    exit 1
	    ;;
    esac
done

exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"}
- ----- 8< ---------- 8< ---------- 8< -----

- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknBXd0ACgkQOypDUo0oQOqZFgCeNL1a3syrYs1d6lG75tIhM834
DpEAnjmvgY4vfxwZWadv2lYRNpYZa/v6
=OZJf
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

