[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lily/freetype-error.cc: const struct #include ;
From: |
Graham Percival |
Subject: |
Re: lily/freetype-error.cc: 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 fixcc.py 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
fixcc.py... and also that we could tweak fixcc.py to avoid this
particular type of change... and also that fixcc.py is previously
confused by a
#define FT_ERROR_START_LIST {
(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 fixcc.py produces un-compilable code. Once that's cleared up, I
can begin seriously comparing different indentation programs]
Cheers,
- Graham
- lily/freetype-error.cc: const struct #include ;, Graham Percival, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Carl Sorensen, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Werner LEMBERG, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Wols Lists, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Alexander Kobel, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Alexander Kobel, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Graham Percival, 2010/09/10