From: "Bob Chapman" Newsgroups: comp.os.msdos.djgpp Subject: Re: gcc-3.x and file suffix .r (RATFOR) bug? Date: Mon, 21 Oct 2002 23:18:06 -0500 Organization: CompuServe Interactive Services Lines: 141 Message-ID: References: <200210180829 DOT 05634 DOT pavenis AT lanet DOT lv> <200210220127 DOT 38891 DOT pavenis AT lanet DOT lv> NNTP-Posting-Host: dal-tgn-tka-vty7.as.wcom.net X-Trace: nntp-m01.news.aol.com 1035260323 18311 206.175.230.7 (22 Oct 2002 04:18:43 GMT) X-Complaints-To: newsmaster AT compuserve DOT com NNTP-Posting-Date: Tue, 22 Oct 2002 04:18:43 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 2.95 "Andris" wrote in message news:200210220127 DOT 38891 DOT pavenis AT lanet DOT lv... > On Monday 21 October 2002 22:11, Bob Chapman wrote: > > "Andris" wrote in message > > news:200210180829 DOT 05634 DOT pavenis AT lanet DOT lv... > > > > > On Thursday 17 October 2002 22:10, Bob Chapman wrote: > > > > Starting with the DJGPP ports of gcc-3.x, file names with suffix '.r' > > > > (RATFOR) are no longer processed correctly by g77 -- the suffix is > > > > recognized and the RATFOR translator is invoked but the translated > > > > output > > > > > > is 'dumped' to stdout (rather than being redirected to the compiler > > > > input) > > > > > > and g77 tries to compile an empty file. I have verified that the > > > > cygwin and mingw ports gcc-3.x also exhibit the same behavior but have > > > > not yet > > > > had > > > > > > time to install gcc-3.x and check this problem under any other > > > > environments. > > > > > > > > Does anyone know if this problem is only associated with the Win9X > > > > ports > > > > of > > > > > > gcc-3.x or if it is a generic GCC 3.X problem? So far I have not been > > > > able > > > > > > to find any bug reports or any notice that the feature had been > > > > removed. > > > > > > I think it's unlikely a problem of DJGPP. One could try to test for > > > > example > > > > > under Linux. I don't know. Also You could run GCC with option -v and try > > > figure out what is wrong. > > > > > > Andris > > > > Followed your suggestion to use '-v' and got these results: > > ---------- > > g77 version 2.95.3 20010315/djgpp (release) . . . > > Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs > > gcc version 2.95.3 20010315/djgpp (release) > > c:/djgpp/bin/ratfor.exe -v -o c:\windows\temp\ccKLY2yb.f test.r > > ---------- > > Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.2/specs > > Configured with: /devel/gcc32/gnu/gcc-3.2/configure i586-pc-msdosdjgpp . . > > . Thread model: single > > gcc version 3.2 > > c:/djgpp/bin/ratfor.exe -v test.r -o c:\windows\temp/ccDRh6nH.f > > --------- > > > > Note a difference in the invocation of ratfor, specifically the '/' instead > > of '\' preceding the name of the temporary file. > > 2.95.3 "-o c:\windows\temp\ccKLY2yb.f" > > 3.2 "-o c:\windows\temp/ccDRh6nH.f" > > > > [As is probably obvious, I have TEMP=c:\windows\temp] > > > > I see. But I don't know anything about ratfor, so I cannot tell more. > Please experiment with ratfor command line options to see what works > and what not, to see what has to be changed. > > Andris From the PD Ratfor man page: >RATFOR(1) PD Ratfor in C RATFOR(1) > >NAME > ratfor77 - ratfor preprocessor for fortran77 > >SYNOPSIS > ratfor [-l n] [-C] [-o output] input > >PARAMETERS > -l n user sets starting label n > > -o output > specify output file, otherwise it is stdout > > -C keep comments in (useful for compiler directives) > At first I thought the problem might be the forward slash '/' in the specification for the temporary file for the gcc 3.2 case. However, this version of ratfor uses a 'getopt' that functions like the 'getopt' in . Consequently, it needs to have the options precede the input filename. Looking at the '-v' output, it can be seen that the 2.95 g77 invoked ratfor as follows: > c:/djgpp/bin/ratfor.exe -o c:\windows\temp\ccKLY2yb.f test.r which tells ratfor to take input from 'test.r' and to send the translated output to temporary file 'c:\windows\temp\ccKLY2yb.f ' instead of stdout. The 3.2 g77 invoked ratfor in a similar fashion: > c:/djgpp/bin/ratfor.exe test.r -o c:\windows\temp/ccDRh6nH.f but, here the input filename precedes the output option and ratfor's 'getopt' terminates before parsing the 'output' option and the output defaults to stdout. Although I still haven't had time to install Red Hat 8.0 and check the 3.2 g77 there -- it appears likely that the problem is generic to GCC 3.x. (1) I can change the version of ratfor I'm using to look at all the args but do you think a GCC bug report is warranted? (2) Is the forward slash '/' in the path OK under DJGPP? Thanks. -----