bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling emacs-20.7 with gcc 2.7.2.1 on m64k-next-nextstep4


From: Eli Zaretskii
Subject: Re: Compiling emacs-20.7 with gcc 2.7.2.1 on m64k-next-nextstep4
Date: Thu, 14 Jun 2001 13:05:53 +0300 (IDT)

On Thu, 14 Jun 2001, Pascal Bourguignon wrote:

> > IIRC, in Emacs sources, macros are mostly used for efficiency, or to 
> > hide implementation of data types in case it will change in the future.
> 
> I  think  that  efficiency  is  better  archieved  with  a  good  data
> structure, and  then using  those nice -O,  -O2, -O6 options.

Not every efficiency aspect can be solved with data structure.  For 
example, imagine a loop that examines many characters in a buffer doing 
some non-trivial processing, and imagine that this same processing needs 
to be done in more than one place.

> And for data hidding, better use a typedef.

Emacs does use typedefs, but operations on the data sometimes use 
macros instead of literal C operators.  See XSTRING and its ilk, for 
example.

> > > The only place where  macros could be allowed, _was_ to define
> > > constants  (now we should  use "const  int cst=1;"),
> > 
> > Emacs still supports old compilers which don't know about `const'.
> 
> Yep, surely.  But it  does not support  gcc-2.7.2.2 (out of  the box).

It does; I routinely compile Emacs with GCC 2.7.2.1 with no problems at 
all.  The problem you reported is specific to your platform.

> How old are those compilers without const?

I think even SunOS native cc is still supported.  That would what, 10 or 
maybe 15 years?

> Do you mean that those  old k&r compilers can compile syntax.c without
> problem?

Yes.

> That they  run on platforms with more than 32  MB RAM and 500
> MB virtual?

Yes, of course.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]