🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #933

lex and cc++ woes..

#933
From: Christian J. Callsen
Date: Mon, 31 Aug 1992 16:43
34 lines
1722 bytes
Hi Netters!

For the record: NeXTstation TURBO Mono, NeXTstep 2.2 Extended.

I am currently experiencing a problem with lex on the NeXT -- or
rather, the skeleton file '/usr/lib/lex/ncform'. Alas it will *not*
compile with the 'cc++' compiler -- _flsbuf and _filbuf (declared in
stdio.h) are declared something like:

extern int _filbuf();
extern int _flsbuf();

.. when they should really have been declared with 1 and 2 arguments,
respectively. Now as 'cc' also handles 'old' prototypes, it actually
flies through, but 'cc++' reports "too many arguments to function" and
prompty refuses to compile. So I guess this is really a bug in (the
old) cc++ or what?

Am I doing something wrong?

What's the easiest (and best?) fix for this `problem'?
 Fix stdio.h myself?
 Patch the cc++ binary to handle old-style decls?
 Say my prayers and hope the problem will go away by itself?

Any opinions?

Chris J. Callsen
--
   __               | Christian J. Callsen  [ callsen@biobio.cs.uiuc.edu ]
  /  ) /            | Currently visiting: U of Illinois, Urbana-Champaign,
 /    /_  __  o _   | Dept. of Comp. Sci., 1304 W. Springfield Avenue,
(__/ / /_/ (_<_/_)_ | Urbana, IL 61801, USA     { Sm:^>le and be Happy Today! }
Technical Details
Message-ID: <CALLSEN.92Aug31104358@ganges.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!wupost!uwm.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!m.cs.uiuc.edu!callsen

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!wupost!uwm.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!m.cs.uiuc.edu!callsen
From: callsen@cs.uiuc.edu (Christian J. Callsen)
Subject: lex and cc++ woes..
Message-ID: <CALLSEN.92Aug31104358@ganges.cs.uiuc.edu>
Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager))
Organization: Department of Computer Science, UIUC
Distribution: comp
Date: Mon, 31 Aug 1992 16:43:58 GMT
Lines: 34