Re: [PATCH] Choose syntax
- From: Pavel Tsekov <ptsekov gmx net>
- Cc: MC dev <mc-devel gnome org>
- Subject: Re: [PATCH] Choose syntax
- Date: Tue, 12 Jul 2005 11:30:27 +0300
Hello,
On Tue, 12 Jul 2005, Oswald Buddenhagen wrote:
> On Tue, Jul 12, 2005 at 10:26:03AM +0300, Pavel Tsekov wrote:
> > > > static const int MAX_ENTRY_LEN = 40;
> > > >
> > > this is c++ (well, except that const implies static, i heard). maybe
> > > its in newer c standards, too, but i'm not sure we want to depend on
> > > them.
> >
> > It is a good practice.
> >
> sure. the preprocessor is evil.
>
> > Do you say that older compilers won't grok this ?
> >
> yes. where older might be pretty recent non-gcc. if we depend on gcc,
> this is hardly an issue; i think it groks it for a decade or something.
I am not a language lawyer so I won't insist. I've just looked at the C
standard and I don't find anything which indicates that this construct is
wrong (of course I may not have looked at the right place). I don't have a
wide range of compilers available currently to perform a real test. I've
tried not so recent Metrowerks, not so recent lcc and BCC 5.5 -
they all compiled the code in question fine. I don't remember working
with a compiler which doesn't support this construct, but of course this
doesn't mean anything. So if you have doubts about the suggested code - do
not use it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]