Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #5610 > unrolled thread

Passing a Method Name to a Method, Redux

Started byGene Wirchenko <genew@ocis.net>
First post2011-06-23 16:03 -0700
Last post2011-06-24 15:50 -0700
Articles 10 on this page of 50 — 10 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-23 16:03 -0700
    Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-23 16:26 -0700
      Re: Passing a Method Name to a Method, Redux blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-27 21:41 +0000
    Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-23 17:24 -0700
      Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-23 19:46 -0700
        Re: Passing a Method Name to a Method, Redux blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-07-04 03:26 +0000
          Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-07-04 03:41 -0700
            Re: Passing a Method Name to a Method, Redux blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-07-05 19:07 +0000
    Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-23 17:34 -0700
      Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-23 19:42 -0700
    Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-23 18:30 -0700
      Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-23 19:48 -0700
        Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-23 21:02 -0700
          Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-06-24 08:38 -0700
            Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-24 09:04 -0700
              Re: Passing a Method Name to a Method, Redux Lew <noone@lewscanon.com> - 2011-06-26 13:43 -0400
                Re: Passing a Method Name to a Method, Redux Lew <noone@lewscanon.com> - 2011-06-26 14:31 -0400
          Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-24 11:45 -0700
            Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-24 12:19 -0700
              Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:39 -0700
                Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-26 23:33 -0700
                  Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-27 13:53 -0700
                    Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-27 18:03 -0700
                      Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-28 11:41 -0700
          Re: Passing a Method Name to a Method, Redux blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-24 19:19 +0000
    Re: Passing a Method Name to a Method, Redux Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-23 19:36 -0700
      Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-24 11:50 -0700
        Re: Passing a Method Name to a Method, Redux Jeff Higgins <jeff@invalid.invalid> - 2011-06-24 17:25 -0400
          Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:42 -0700
            Re: Passing a Method Name to a Method, Redux markspace <-@.> - 2011-06-26 23:27 -0700
            Re: Passing a Method Name to a Method, Redux Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-27 03:04 -0400
              Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-06-27 13:12 -0700
                Re: Passing a Method Name to a Method, Redux Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-27 13:36 -0700
                Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 20:43 -0400
                  Re: Passing a Method Name to a Method, Redux Gene Wirchenko <genew@ocis.net> - 2011-07-22 12:35 -0700
                    Re: Passing a Method Name to a Method, Redux Patricia Shanahan <pats@acm.org> - 2011-07-22 13:09 -0700
                    Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-07-22 13:35 -0700
                    Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 16:53 -0400
                    Re: Passing a Method Name to a Method, Redux Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-23 13:19 +0000
                      Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 11:19 -0400
                        Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-07-23 09:20 -0700
                          Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 13:33 -0400
                            Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-07-23 11:43 -0700
                              Re: Passing a Method Name to a Method, Redux lewbloch <lewbloch@gmail.com> - 2011-07-23 12:14 -0700
                                Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 19:19 -0400
                              Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 19:12 -0400
                        Re: Passing a Method Name to a Method, Redux Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-23 17:24 +0000
                          Re: Passing a Method Name to a Method, Redux Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 19:22 -0400
                            Re: Passing a Method Name to a Method, Redux Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-24 10:02 +0000
        Re: Passing a Method Name to a Method, Redux Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-24 15:50 -0700

Page 3 of 3 — ← Prev page 1 2 [3]


#6463

Fromlewbloch <lewbloch@gmail.com>
Date2011-07-23 09:20 -0700
Message-ID<2aca8f06-1dc8-4fff-b7f1-0e35eea32d2f@f39g2000prb.googlegroups.com>
In reply to#6449
On Jul 23, 8:19 am, Arne Vajhøj <a...@vajhoej.dk> wrote:
> On 7/23/2011 9:19 AM, Martin Gregorie wrote:
>
>
>
>
>
>
>
>
>
> > On Fri, 22 Jul 2011 12:35:00 -0700, Gene Wirchenko wrote:
>
> >> On Thu, 21 Jul 2011 20:43:10 -0400, Arne Vajhøj<a...@vajhoej.dk>  wrote:
>
> >>> On 6/27/2011 4:12 PM, Gene Wirchenko wrote:
> >>>> On Mon, 27 Jun 2011 03:04:11 -0400, Joshua Cranmer
> >>>> <Pidgeo...@verizon.invalid>   wrote:
>
> >>>>> On 06/26/2011 11:42 PM, Gene Wirchenko wrote:
> >>>>>>         Think simple version of the C preprocessor.
>
> >>>>> Then why not use the C preprocessor?
>
> >>>>        I could not find one that would run standalone on my system.
>
> >>> Almost all C compiler has a way to do only preprocessing.
>
> >>> GCC, MS, DEC/CPQ/HP etc. has.
>
> >>       I did not want a C compiler.  I simply wanted a preprocessor.
>
> > 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.

<http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Preprocessor-
Options.html#Preprocessor-Options>
"If you use the -E option, nothing is done except preprocessing. Some
of these options make sense only together with -E because they cause
the preprocessor output to be unsuitable for actual compilation."

Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
reading the documentation!

For example, I found out just now that there's a GCC Go!
<http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Standards.html#Standards>
§2.4
<http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gccgo/>

I had not known that.

--
Lew

[toc] | [prev] | [next] | [standalone]


#6470

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-07-23 13:33 -0400
Message-ID<4e2b05e3$0$310$14726298@news.sunsite.dk>
In reply to#6463
On 7/23/2011 12:20 PM, lewbloch wrote:
> On Jul 23, 8:19 am, Arne Vajhøj<a...@vajhoej.dk>  wrote:
>> On 7/23/2011 9:19 AM, Martin Gregorie wrote:
>>> On Fri, 22 Jul 2011 12:35:00 -0700, Gene Wirchenko wrote:
>>
>>>> On Thu, 21 Jul 2011 20:43:10 -0400, Arne Vajhøj<a...@vajhoej.dk>    wrote:
>>
>>>>> On 6/27/2011 4:12 PM, Gene Wirchenko wrote:
>>>>>> On Mon, 27 Jun 2011 03:04:11 -0400, Joshua Cranmer
>>>>>> <Pidgeo...@verizon.invalid>     wrote:
>>
>>>>>>> On 06/26/2011 11:42 PM, Gene Wirchenko wrote:
>>>>>>>>          Think simple version of the C preprocessor.
>>
>>>>>>> Then why not use the C preprocessor?
>>
>>>>>>         I could not find one that would run standalone on my system.
>>
>>>>> Almost all C compiler has a way to do only preprocessing.
>>
>>>>> GCC, MS, DEC/CPQ/HP etc. has.
>>
>>>>        I did not want a C compiler.  I simply wanted a preprocessor.
>>
>>> 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.
>
> <http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Preprocessor-
> Options.html#Preprocessor-Options>
> "If you use the -E option, nothing is done except preprocessing. Some
> of these options make sense only together with -E because they cause
> the preprocessor output to be unsuitable for actual compilation."
>
> Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
> reading the documentation!

Is is great reading the FM.

In this case the FM (at least not in what you quote) does not cover
the topic of discussion - whether it is a monolithic executable
or a series of executables.

Arne

[toc] | [prev] | [next] | [standalone]


#6473

Fromlewbloch <lewbloch@gmail.com>
Date2011-07-23 11:43 -0700
Message-ID<66de694c-382e-473c-a9c3-2c8433bc837c@r5g2000prf.googlegroups.com>
In reply to#6470
On Jul 23, 10:33 am, Arne Vajhøj <a...@vajhoej.dk> wrote:
> On 7/23/2011 12:20 PM, lewbloch wrote:
>
>
>
>
>
>
>
>
>
> > On Jul 23, 8:19 am, Arne Vajh j<a...@vajhoej.dk>  wrote:
> >> On 7/23/2011 9:19 AM, Martin Gregorie wrote:
> >>> On Fri, 22 Jul 2011 12:35:00 -0700, Gene Wirchenko wrote:
>
> >>>> On Thu, 21 Jul 2011 20:43:10 -0400, Arne Vajh j<a...@vajhoej.dk>    wrote:
>
> >>>>> On 6/27/2011 4:12 PM, Gene Wirchenko wrote:
> >>>>>> On Mon, 27 Jun 2011 03:04:11 -0400, Joshua Cranmer
> >>>>>> <Pidgeo...@verizon.invalid>     wrote:
>
> >>>>>>> On 06/26/2011 11:42 PM, Gene Wirchenko wrote:
> >>>>>>>>          Think simple version of the C preprocessor.
>
> >>>>>>> Then why not use the C preprocessor?
>
> >>>>>>         I could not find one that would run standalone on my system.
>
> >>>>> Almost all C compiler has a way to do only preprocessing.
>
> >>>>> GCC, MS, DEC/CPQ/HP etc. has.
>
> >>>>        I did not want a C compiler.  I simply wanted a preprocessor.
>
> >>> 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.
>
> > <http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Preprocessor-
> > Options.html#Preprocessor-Options>
> > "If you use the -E option, nothing is done except preprocessing. Some
> > of these options make sense only together with -E because they cause
> > the preprocessor output to be unsuitable for actual compilation."
>
> > Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
> > reading the documentation!
>
> Is is great reading the FM.
>
> In this case the FM (at least not in what you quote) does not cover
> the topic of discussion - whether it is a monolithic executable
> or a series of executables.

A difference that makes no difference is no difference.

--
Lew

[toc] | [prev] | [next] | [standalone]


#6476

Fromlewbloch <lewbloch@gmail.com>
Date2011-07-23 12:14 -0700
Message-ID<e15c606b-a7a7-44f8-8363-03ed20e71f72@g5g2000prn.googlegroups.com>
In reply to#6473
lewbloch wrote:
> Arne Vajhøj wrote:
>> lewbloch wrote:
>>> Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
>>> reading the documentation!
>
>> Is is great reading the FM.
>>
>> In this case the FM (at least not in what you quote) does not cover
>> the topic of discussion - whether it is a monolithic executable
>> or a series of executables.
>
> A difference that makes no difference is no difference.

But for completeness:

http://gcc.gnu.org/onlinedocs/cpp/index.html#Top
"The C preprocessor implements the macro language used to transform C,
C++, and Objective-C programs before they are compiled. It can also be
useful on its own."

http://gcc.gnu.org/onlinedocs/cpp/Overview.html#Overview
"The C preprocessor, often known as cpp, is a macro processor that is
used automatically by the C compiler to transform your program before
compilation."

From the bash shell:

$ which cpp
/usr/bin/cpp
$ ls -l /usr/bin/cpp
lrwxrwxrwx 1 root root 7 May 31 12:37 /usr/bin/cpp -> cpp-4.4
$ ls -l /usr/bin/cpp-4.4
-rwxr-xr-x 1 root root 255192 Mar 26  2010 /usr/bin/cpp-4.4

This can be learned from reading the frakkin' manual as suggested!
Does everyone have to be spoonfed everything?

The idea here is to follow the general principle, e.g., RTFM!, so that
one can be independently brilliant.  Just because I only led you to
the door and didn't open it and spread roses in your path doesn't make
my advice bad.  I anticipate that any real programmer will take the
hint and do their own homework, once shown where they can look.

For example, the poster who whined about wanting a standalone
preprocessor could have easily looked up those links posted here,
given the hint that it was at least possible that the indicated
documentation would yield that data.  For that matter, so could you
have.  It would have been far more helpful for you to post the
additional data to help that whiner than to speciously complain that I
didn't.  Don't you want to be helpful?

But in the end, monolithic or separate, they get the ability to run
the preprocessor on its own EVEN WERE IT PART OF A MONOLITHIC
PROGRAM!  Why wouldn't that suit, hm?

So let's fry that red herring and eat it, not proffer it as some sort
of valid counterargument.

RTFM!

--
Lew
RTFM!

[toc] | [prev] | [next] | [standalone]


#6485

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-07-23 19:19 -0400
Message-ID<4e2b56f8$0$305$14726298@news.sunsite.dk>
In reply to#6476
On 7/23/2011 3:14 PM, lewbloch wrote:
> lewbloch wrote:
>> Arne Vajhøj wrote:
>>> lewbloch wrote:
>>>> Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
>>>> reading the documentation!
>>
>>> Is is great reading the FM.
>>>
>>> In this case the FM (at least not in what you quote) does not cover
>>> the topic of discussion - whether it is a monolithic executable
>>> or a series of executables.
>>
>> A difference that makes no difference is no difference.
>
> But for completeness:

[links to cpp docs]

> This can be learned from reading the frakkin' manual as suggested!
> Does everyone have to be spoonfed everything?
>
> The idea here is to follow the general principle, e.g., RTFM!, so that
> one can be independently brilliant.  Just because I only led you to
> the door and didn't open it and spread roses in your path doesn't make
> my advice bad.  I anticipate that any real programmer will take the
> hint and do their own homework, once shown where they can look.
>
> For example, the poster who whined about wanting a standalone
> preprocessor could have easily looked up those links posted here,
> given the hint that it was at least possible that the indicated
> documentation would yield that data.  For that matter, so could you
> have.  It would have been far more helpful for you to post the
> additional data to help that whiner than to speciously complain that I
> didn't.  Don't you want to be helpful?
>
> But in the end, monolithic or separate, they get the ability to run
> the preprocessor on its own EVEN WERE IT PART OF A MONOLITHIC
> PROGRAM!  Why wouldn't that suit, hm?

Hm.

This little subthread is not about the OP's problem, but about
whether GCC is monolitic.

Just saying RTFM is fine.

Saying RTFM and providing relevant information from the FM for
the discussion is fine.

I can not really see any point in saying RTFM and providing
irrelevant information from the FM.

And I don't think that is requiring to be spoonfed.

Arne

[toc] | [prev] | [next] | [standalone]


#6484

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-07-23 19:12 -0400
Message-ID<4e2b557d$0$305$14726298@news.sunsite.dk>
In reply to#6473
On 7/23/2011 2:43 PM, lewbloch wrote:
> On Jul 23, 10:33 am, Arne Vajhøj<a...@vajhoej.dk>  wrote:
>> On 7/23/2011 12:20 PM, lewbloch wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jul 23, 8:19 am, Arne Vajh j<a...@vajhoej.dk>    wrote:
>>>> On 7/23/2011 9:19 AM, Martin Gregorie wrote:
>>>>> On Fri, 22 Jul 2011 12:35:00 -0700, Gene Wirchenko wrote:
>>
>>>>>> On Thu, 21 Jul 2011 20:43:10 -0400, Arne Vajh j<a...@vajhoej.dk>      wrote:
>>
>>>>>>> On 6/27/2011 4:12 PM, Gene Wirchenko wrote:
>>>>>>>> On Mon, 27 Jun 2011 03:04:11 -0400, Joshua Cranmer
>>>>>>>> <Pidgeo...@verizon.invalid>       wrote:
>>
>>>>>>>>> On 06/26/2011 11:42 PM, Gene Wirchenko wrote:
>>>>>>>>>>           Think simple version of the C preprocessor.
>>
>>>>>>>>> Then why not use the C preprocessor?
>>
>>>>>>>>          I could not find one that would run standalone on my system.
>>
>>>>>>> Almost all C compiler has a way to do only preprocessing.
>>
>>>>>>> GCC, MS, DEC/CPQ/HP etc. has.
>>
>>>>>>         I did not want a C compiler.  I simply wanted a preprocessor.
>>
>>>>> 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.
>>
>>> <http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Preprocessor-
>>> Options.html#Preprocessor-Options>
>>> "If you use the -E option, nothing is done except preprocessing. Some
>>> of these options make sense only together with -E because they cause
>>> the preprocessor output to be unsuitable for actual compilation."
>>
>>> Ain't the FM (of "RTFM") a marvel? Amazing what one can learn by
>>> reading the documentation!
>>
>> Is is great reading the FM.
>>
>> In this case the FM (at least not in what you quote) does not cover
>> the topic of discussion - whether it is a monolithic executable
>> or a series of executables.
>
> A difference that makes no difference is no difference.

It has no impact on the OP's problem, but there was a little
side discussion on the GCC implementation.

Arne

[toc] | [prev] | [next] | [standalone]


#6468

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2011-07-23 17:24 +0000
Message-ID<j0f042$p4k$1@localhost.localdomain>
In reply to#6449
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.... 


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

[toc] | [prev] | [next] | [standalone]


#6486

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-07-23 19:22 -0400
Message-ID<4e2b57ab$0$309$14726298@news.sunsite.dk>
In reply to#6468
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

[toc] | [prev] | [next] | [standalone]


#6501

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2011-07-24 10:02 +0000
Message-ID<j0gqjo$8ho$2@localhost.localdomain>
In reply to#6486
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       |

[toc] | [prev] | [next] | [standalone]


#5659

FromJoshua Cranmer <Pidgeot18@verizon.invalid>
Date2011-06-24 15:50 -0700
Message-ID<iu34c8$81s$1@dont-email.me>
In reply to#5652
On 6/24/2011 11:50 AM, Gene Wirchenko wrote:
> On Thu, 23 Jun 2011 19:36:53 -0700, Joshua Cranmer
> <Pidgeot18@verizon.invalid>  wrote:
>> Here is probably the best implementation:
>
>       Nope.  I want a configurable character set for identifiers

You can configure it. You configure it by calling the first method. If 
you don't like it, you can have people configure it by setting the array 
value themselves. Note that this is a similar implementation to your 
"TreeSet" idea, just using a raw array instead of a TreeSet.

If you are really concerned about speeds, it is a higher-cost initial 
overhead and an asymptotically and practically faster per-character 
lookup time.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.java.programmer


csiph-web