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