From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: GCC bugs Date: 20 Jan 2000 16:25:35 GMT Organization: Aachen University of Technology (RWTH) Lines: 36 Message-ID: <867ctv$i7q$1@nets3.rz.RWTH-Aachen.DE> References: <01bf611a$9c6e9500$LocalHost AT alex> <3883BCC2 DOT 2CC1DCD9 AT a DOT crl DOT com> <01bf61c3$70f0a7c0$LocalHost AT alex> <01bf627f$0b8075c0$LocalHost AT alex> <20ya9li3gm DOT fsf AT Sky DOT inp DOT nsk DOT su> <01bf6359$2df17020$LocalHost AT alex> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 948385535 18682 137.226.32.75 (20 Jan 2000 16:25:35 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 20 Jan 2000 16:25:35 GMT User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586)) Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexei A. Frounze wrote: [*.c vs. *.C file] Phew, such a long discussion, which could easily have been avoided, if you had done as the FAQs suggest: add '-v' to the gcc command line(s) and look at the output, or post it here. The difference would have been really easy to spot (cc1 vs. cc1plus usage). Lesson to take home: don't use *.c or similar wildcards when calling gcc directly from command.com or a batch file. They'll turn into *.C, automatically. > But why output is casesensitive to input file extension??? Because gcc comes from the world of Unix, where you can have two files 'foo.c' and 'foo.C', in the same directory, and they really are separate files, not just two way to reach the same file, as in DOS. In Unix, '.C' is a filename extensions used for C++ files, and different from '.c', which is for C files. This is also clearly documented in the gcc docs (node 'Overall Options'): `FILE.cc' `FILE.cxx' `FILE.cpp' `FILE.C' C++ source code which must be preprocessed. Note that in `.cxx', the last two letters must both be literally `x'. Likewise, `.C' refers to a literal capital C. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.