David Nolden wrote:
> On Thursday 21 June 2007 16:22:59 David Nolden wrote:
>> You also don't need indentation, still you use it.
It is consistent placing
>> a semicolon behind every statement.
>
> Ok, behind functions it would look really stupid, but
behind independent
> macros I think it's useful, because it makes clear that
the macro is an
> independent statement, and it cannot break a parser
that doesn't know the
> macro.
>
> But since it won't be allowed in the next versions of
gcc, and because gcc
> with -pedantic doesn't accept it, of course I won't do
it any more.
To throw in my $0.02, I tend to write macros that look
like:
#define FOO <something> (void)0
...which /forces/ you to put a semicolon after it. IMO the
semicolon
after a function-like macro is good, but one should also
write macros
such that a: it is required, and b: it correctly closes a
statement (so
you aren't relying on the compiler to ignore it) .
--
Matthew
"Request to turn back time / And rectify my
wrongs..."
-- from "Title of the Song", DaVinci's
Notebook
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|