🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.misc
Article #1085

re: C-Power 64 sys call -- HELP!

#1085
From: prindle
Date: Tue, 07 Apr 1987 02:02
19 lines
1386 bytes
In C, to pass the pointer of an object to a function (or to take the address
of an object with the & operator in general), that object must be "static" or
"auto", not "register"!  In most C compilers, the default storage class is
"auto" (given that you don't explicitly declare a storage class).  But in C-
Power, the default storage class is "register".  To solve your problem (or
at least make it manageable - I didn't check it out, just saw the obvious),
either declare any variables which you use & with to be explicitly auto as in:
	auto char x;
instead of:
	char x;
Or, even simpler, but it will make your programs run slower, use the "-a"
option when invoking the compiler - this will force the default storage class
to become "auto"; then if it works, go back and declare all variables which
can be "register" to explicitly be so.
Hope this solves your problem.

Sincerely,
Frank Prindle
Prindle@NADC.arpa
Technical Details
Message-ID: <6734@brl-adm.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!brl-adm!adm!prindle@nadc.arpa

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!brl-adm!adm!prindle@nadc.arpa
From: prindle@nadc.arpa
Newsgroups: comp.sys.misc
Subject: re: C-Power 64 sys call -- HELP!
Message-ID: <6734@brl-adm.ARPA>
Date: Mon, 6-Apr-87 21:02:00 EST
Article-I.D.: brl-adm.6734
Posted: Mon Apr  6 21:02:00 1987
Date-Received: Wed, 8-Apr-87 02:12:56 EST
Sender: news@brl-adm.ARPA
Lines: 19