emacs-devel
[Top][All Lists]
Advanced

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

Re: Change of C indentation style ('{')


From: Miles Bader
Subject: Re: Change of C indentation style ('{')
Date: 24 Oct 2003 19:11:59 +0900

Martin Stjernholm <address@hidden> writes:
> > The thing is, I wouldn't be surprised if `macro oddities' are actually
> > more common than the nested functions, or functions in macro arguments...
> 
> You're probably right when it comes to C which uses cpp a lot. Perhaps
> also for C++, ObjC and Pike; they have cpp support too but it's not
> used quite as much there.
> 
> It should be possible to add some more checks. Afterall, macro
> constructs like that can only be ambiguous with really old fashioned
> K&R style function definitions.

I was thinking of things like:

   #define some_iterator_macro(var, arg1, arg2) ...

   void some_function (int y, int z)
   {
     some_iterator_macro (x, y + 3, z)
       {
         do_something_with (x);
       }
   }

That sort of macro usage is fairly common, and looks vaguely like an
ANSI C function declaration (no?).

-miles
-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff




reply via email to

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