[Top][All Lists]

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

Re: lily/ const struct #include ;

From: Graham Percival
Subject: Re: lily/ const struct #include ;
Date: Mon, 6 Sep 2010 22:19:28 +0100

On Mon, Sep 6, 2010 at 8:08 PM, Werner LEMBERG <address@hidden> wrote:
> [Wearing the FreeType maintainer hat]


>>> I see a really weird C++ construct in this (short) file:
> What's the problem?

The problem -- and I readily admit that this isn't a problem with
freetype -- is that if we run our script on the file twice,
it produces:
} ft_errors[]

  = #include <freetype/fterrors.h>;

which g++ obviously doesn't like.

Now, I totally admit that we might not want to continue using and also that we could tweak to avoid this
particular type of change... and also that is previously
confused by a
(it puts the { on a new line, then indents everything as if it was
inside a function)... but since I didn't recognize the C++ construct,
I thought it was worth asking.

I mean, why _do_ we have a hanging = sign?  I could understand if it
was any of these:
} ft_errors = 0;
} ft_errors = NULL;
} ft_errors;

(with the #include being higher up in the file), but it seems really
weird to have a dangling = sign in there.

If you're certain that this is good usage, though, then that's ok.
I'll figure out some other way of dealing with this problem.

[for the curious: other than this issue, there's only one more case
where produces un-compilable code.  Once that's cleared up, I
can begin seriously comparing different indentation programs]

- Graham

reply via email to

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