🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #7026

Warning: Sun f77 1.4 beta clashes with yacc generated C code

#7026
From: Simon Pigot
Date: Mon, 18 Mar 1991 17:28
57 lines
2604 bytes
Severe problems occur when using fortran 1.4 beta with C code generated
using yacc. It seems that fortran 1.4 beta uses a yacc parser to parse
fortran format specifications. Unfortunately the symbols used by their
yacc parser conflict with those of any local yacc parsers called - the
result is total confusion during formatted i/o including spurious error
messages most often reflecting format statements which have been mangled
because of the clash.

eg: This program has a C main which uses a yacc parser, at one stage it
    calls a fortran program which happens to do some formatted internal i/o. 
    The following error message results because of clashes between the f77
    1.4 compiler fortran format yacc parser and the local yacc parser.

ifio: [100] error in format
lately: writing sequential formatted internal IO
part of last format: (I5)
part of last string: |

Proof:

If you use nm(1) on libF77.so.1.4 you can see the yacc symbols and 
entrypoints the compiler wants to use:

		0005c9f0 D _yyact
		00000004 C _yychar
		0005cfb8 D _yychk
		00000004 C _yydebug
		0005d128 D _yydef
		00000004 C _yyerrflag
		00042f90 T _yyerror
		0005c990 D _yyexca
		00042934 T _yylex
		00000004 C _yylval
		00000004 C _yynerrs
		0005cbd0 D _yypact
		00041ac0 T _yyparse
		0005cd40 D _yypgo
		0005ea04 b _yyps
		0005ea00 b _yypv
		0005cd70 D _yyr1
		0005ce94 D _yyr2
		0005e9fc b _yys
		0005ea08 b _yystate
		0005ea0c b _yytmp
		0005e9f8 b _yyv
		00000004 C _yyval

Some of the yacc parser data structures are statics but others are
not.....  Some of these are entrypoints (yyparse, yylex and yyerror) and
get confused with the local yacc parser entrypoints.....

I hope the sun fortran people fix this before the final 1.4 release. 

Simon Pigot,                                               (spigot@esri.com)
Environmental Systems Research Institute,
380 New York Street,
Redlands, Ca. 92373                          Phone: (714) 793-2853 ext. 1479
Technical Details
Message-ID: <1931@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: esri!atlas!simon@uunet.uu.net (Simon Pigot)
Newsgroups: comp.sys.sun
Subject: Warning: Sun f77 1.4 beta clashes with yacc generated C code
Keywords: Software
Message-ID: <1931@brchh104.bnr.ca>
Date: 18 Mar 91 17:28:00 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 57
Approved: Sun-Spots@rice.edu
X-Original-Date: Mon, 4 Mar 91 22:29:50 PST
X-Sun-Spots-Digest: Volume 10, Issue 53, message 18
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu