delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/18/15:48:10

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com
From: ABCD <en DOT ABCD AT gmail DOT 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 DOT 1080404 AT users DOT sourceforge DOT net> <49C07906 DOT 2060504 AT gmail DOT com> <49C07E09 DOT 5070909 AT users DOT sourceforge DOT net> <49C0E323 DOT 9000109 AT byu DOT net>
Mime-Version: 1.0
User-Agent: Thunderbird 2.0.0.19 (X11/20090106)
In-Reply-To: <49C0E323.9000109@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019