Re: [PATCH] Choose syntax



Hello,

On Tue, 12 Jul 2005, Leonard den Ottolander wrote:

> On Tue, 2005-07-12 at 09:14, Pavel Tsekov wrote:
> > I know that it is cleaner and better. The macro is something that is
> > handled by the preprocessor i.e. before the compiler steps in. So the
> > compiler doesn't know anything about MAX_ENTRY_LEN . If it knew it could
> > do useful checks (like typechecking and more) and certain smart decisions
> > (if the compiler is smart enough :) ). Also you cannot have debugging
> > information for a macro.
>
> So would this also be the case for MAX_SYNTAX_FILES? The #defines like
> in syntax.h are very common. Bad practice?

My idea was that we should start using this construct in newly introduced
code like the one in your patch. Macros already present in the code can
stay for some time and slowly be converted. But if we consider the posts from
Oswald we should not use this construct :( Though it didn't become clear
from his posts which part of the construct causes the compiler to barf
neither which compiler versions do not grok it. I guess these must be
fairly old compiler systems, but still available on older machines :(



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