Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Passing a Method Name to a Method, Redux

Reply
Thread Tools

Passing a Method Name to a Method, Redux

 
 
Arne Vajhøj
Guest
Posts: n/a
 
      07-23-2011
On 7/23/2011 1:24 PM, Martin Gregorie wrote:
> On Sat, 23 Jul 2011 11:19:19 -0400, Arne Vajhøj wrote:
>
>> On 7/23/2011 9:19 AM, Martin Gregorie wrote:

>
>>> The last C compilers I remember that had separate preprocessors were
>>> K&R, so were very old. In these, cc was effectively a shell that
>>> invoked the preprocessor, the C --> assembler translator, the
>>> assembler and the linker in turn. Actually, I'm still using one - the
>>> standard OS/9 v2.4 C compiler, which dates from 1992 and runs on 68xxx
>>> hardware.
>>>
>>> I don't remember any ANSI C compilers I've used being structured this
>>> way: certainly I've not seen any version of the GNU compiler or its
>>> derivatives that aren't a monolithic chunk that includes all
>>> compilation stages except the linker. AFAICR this also applied to the
>>> Borland compilers.
>>>
>>> So, if that's really what you want, go and find a old K&R compiler or
>>> its source.

>>
>> GCC still has a separate executable for preprocessing!
>>
>> The driver gcc or g++ calls cpp, cc1 or cc1plus, as and ld.
>>

> Fair cop, guv.
>
> I looked at /usr/bin, thought the preprocessor was called cpre so didn't
> find it and glanced through 'man gcc' but didn't find anything describing
> the compiler structure. The fact that the options are subdivided onto
> compilation stages doesn't necessarily say anything about the compiler
> physical structure, and as gcc is fairly big, I assumed....


It is cpp (or gcc-cpp).

Not a very good name - most would assume that cpp=c plus plus.

But then most people would call it via the general compiler driver, so
it does not matter much.

Arne

 
Reply With Quote
 
 
 
 
Martin Gregorie
Guest
Posts: n/a
 
      07-24-2011
On Sat, 23 Jul 2011 19:22:13 -0400, Arne Vajhøj wrote:

> It is cpp (or gcc-cpp).
>
> Not a very good name - most would assume that cpp=c plus plus.
>
> But then most people would call it via the general compiler driver, so
> it does not matter much.
>

I looked for cpre since I thought that was what the preprocessor was
called in Microware's K&R compiler. I just ran the compiler up to check
(its been a long time since I compiled C on that machine) and found it
too calls it cpp. A visible difference between gcc and the OS/9 compiler
(cc) is that the latter displays the name and arguments of each compiler
phase as it is executed: its quite a nice thing to do on a slow machine
(25 MHz 68020).


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a Method Name to a Method Gene Wirchenko Java 33 06-25-2011 07:26 PM
Passing a method(reference) to an other method and calling themethod. Erik Java 11 03-29-2008 07:26 AM
Passing method name to method? Arfon Smith Ruby 3 09-28-2007 03:38 PM
Passing math method to another method? Neutek Ruby 11 01-18-2007 09:23 AM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57