Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!orchid!jagardner From: jagardner@orchid.UUCP Newsgroups: comp.lang.c Subject: Re: A feature I'd like to see (was C flaws) Message-ID: <11156@orchid.waterloo.edu> Date: Tue, 13-Oct-87 18:19:33 EDT Article-I.D.: orchid.11156 Posted: Tue Oct 13 18:19:33 1987 Date-Received: Sat, 17-Oct-87 11:32:46 EDT References: <1132@gilsys.UUCP> <11480008@hpsmtc1.HP.COM> <313@dg-rtp.UUCP> <15522@topaz.rutgers.edu> Reply-To: jagardner@orchid.waterloo.edu (Jim Gardner) Organization: U. of Waterloo, Ontario Lines: 21 In article <15522@topaz.rutgers.edu> ron@topaz.rutgers.edu (Ron Natalie) writes: >One feature I'd like to see in C (or any other language) is the >ability to bind an arbitrary C legal name to an arbitrary machine >specific external. For example, if I wanted the machine symbol >"foo-bar" I could do something like... > > equivelence int foo_bar "foo-bar"; > >-Ron In our compiler we have #pragma equate foo_bar foo-bar which works like a #define to the parser (ie. the parser converts foo_bar into foo-bar for the code-generator and linker). We also have #pragma alias foo_bar foo-bar so that the object named by foo_bar is given another name, which can be used by a module written in a different language (or by the C library, to avoid conflicts with user defined routines). David Tanguay