[Freeciv-Dev] Re: (PR#11281) [C++] forward enum declaration in common/fc
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11281 >
On Wed, 1 Dec 2004, [UTF-8] Frédéric Brière wrote:
> This is a forward declaration of an enum, and is actually invalid under
> C89 and C99, as well as C++. (gcc will trigger an error in pedantic
> mode.) C compilers tend to be lenient about this, but C++ compilers are
> more stringent. [*]
>
> There are three possible solutions:
>
> - Moving the enum before the typedef
>
> - Moving the typedef after the enum
Either are ok by me.
> - Changing the typedef for a #define
No way.
> I don't think I'm qualified to make that decision, so I'll let you
> figure out what to do.
>
>
> [*] They have to. But then again, they could make an exception for a
> simple typedef. It's just too much hassle for what it's worth.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|