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]

Re: Mistaken change in GCC (fwd)


      I do not see why you
    expect it to work

The Emacs developers expected it to work because it did work in GCC
2.95.2.  In other words, an incompatible change has been made in GCC:

    gerd@gnu.org:
    > Is that problem relevant to building Emacs?  I'd imagine that 
    > "-traditional" should work with Emacs.

    I'm not sure.  From the line number I think it's the use of `#if
    #cpu(i386)...' in s/gnu-linux.h.  But this doesn't give an error with
    `cpp -traditional' with GCC 2.95.2, here.

    meyering@ascend.com:
    Looks like this is another change, though less recent.
    My gcc snapshots go back to Sept 9, which works the same as that
    of Nov 11...

That's enough reason to fix the bug, if it is at all feasible.
But there is another special reason why this combination of features
should work.

      Especially
    not newer extensions.  The code sample you provide is not only not
    acceptable as K+R C, it is not acceptable as conforming ISO C.

GCC features come from many places, not only K&R and ISO C.  This
feature comes from SVR4; I added it because it is a more coherent and
systematic way of checking the type of machine and the type of system
than the usual method of defining a symbol for each one.

You can't do a good job of developing GCC if you are prejudiced
against features on account of their place of origin.

      It certainly
    never existed in any genuine K+R compiler.  I do not see why you
    expect it to work in GCC's emulation of a K+R compiler.

Thinking of --traditional in this way will tend to lead to bad
decisions.  Its purpose is to make old constructs work, not to emulate
an old compiler and its limitations.  It is very common for some newer
constructs to be used in conjunction with old ones.

For instance, people designing header files for use with GCC that
check the type of machine ought to use the #cpu feature, because that
is cleaner and more elegant than older ways of doing the job.  But
these header files will often want to be used by programs compiled
with --traditional.

So it is important for cpp to support using #cpu with --traditional.


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