This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [using gcc book] ch1 objective-c blurb


Chris Devers wrote:
After splitting the text of _Using and Porting GCC_ into the _Using..._
and _Porting..._ books, the material remaining in _Using..._ is primarily
about C, C++, and Objective-C support. Chapter one, which is only a page
long, includes paragraphs about the first two language, but doesn't really
discuss the Objective-C aspect.

Based roughly on what is said about C++/G++, I've taken a stab at a
writeup of the ObjC side, but I'd like to be sure that what I'm saying
isn't wildly inaccurate.

For comparison, here's the existing G++ writeup:

    G++ is a compiler, not merely a preprocessor. G++ builds
    object code directly from your C++ program source. There
    is no intermediate C version of the program. (By contrast,
    for example, some other implementations use a program that
    generates a C program from your C++ source.) Avoiding an
    intermediate C representation of the program means that you
    get better object code, and better debugging information. The
    GNU debugger, GDB, works with this information in the object
    code to give you comprehensive C++ source-level editing
    capabilities (see section .C and C++. in Debugging with GDB).

Here's my ObjC paragraph:

    Compilation of Objective-C programs is done with GCC itself,
    rather than a front end like G++ or GNAT. As with G++
    programs, the lack of a preprocessor and the direct build
    of object code from your Objective-C program source provides
    better object code and better debugging capabilities.

Does this accurately reflect things? Is there anything else that should be
mentioned?

My first thought about this is that while some discussion of Objective C may be called for, the paragraph you propose above is completely unnecessary. The manual mentions that G++ doesn't use a preprocessor because the first popular C++ compiler, AT&T's CFRONT, actually *was* a preprocessor which used the normal C compiler as the back end. The GNU project wanted to emphasize that G++ had a superior implementation.

I admittedly don't know much about Objective C, but my impression is that it
never had a preprocessor-based implementation (in the CFRONT sense of the term),
so there is no particular reason to point out that our implementation doesn't
use one.

Colin




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]