delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/21:17:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B5125BB.2010500@gmail.com>
Date: Sat, 16 Jan 2010 02:34:35 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problem with gpc on 1.7.1
References: <323ac04e1001090925u7e413022r6d0481645502793a AT mail DOT gmail DOT com>
In-Reply-To: <323ac04e1001090925u7e413022r6d0481645502793a@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Yuri Gribov wrote:

> Here are the symptoms. I try to compile a simple Pascal program (see
> attach). When it's name is lowercase (say temp.pas) it compiles fine:
> $ gpc temp.pas
> temp.pas:0: warning: missing program header
> 
> but when I change it to uppercase (TEMP.PAS) I get internal compiler error:
> $ mv temp.pas TEMP.PAS
> $ gpc TEMP.PAS
> gpc: Internal GPC problem: internal option `--amtmpfile' not given

  From "info gpc":

> 5.2 The most commonly used options to GPC
> =========================================

>    Users familiar with BP, please note that you have to give the file
> name extension `.pas': GPC is a common interface for a Pascal compiler,
> a C, ObjC and C++ compiler, an assembler, a linker, and perhaps an Ada
> and a FORTRAN compiler. From the extension of your source file GPC
> figures out which compiler to run. GPC recognizes Pascal sources by the
> extension `.pas', `.p', `.pp' or `.dpr'. GPC also accepts source files
> in other languages (e.g., `.c' for C) and calls the appropriate
> compilers for them. Files with the extension `.o' or without any special
> recognized extension are considered to be object files or libraries to
> be linked.

  Note that it is case-sensitive about the extension.  "TEMP.pas" works fine.
 If you want to use upper-case names, GPC won't recognize them automatically
as pascal source files, but you can precede them on the command-line with the
-x option in order to specify the language manually:

> $ gpc TEM.PAS
> gpc: Internal GPC problem: internal option `--amtmpfile' not given
> 
> $ gpc -x Pascal TEM.PAS
> TEM.PAS:0: warning: missing program header

  This behaviour should be the same on Linux, although I haven't checked.

    cheers,
      DaveK


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

- Raw text -


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