On Wed, 2012-06-27 at 17:16 +0200, Marko Lindqvist wrote:
> Details:
> 
> Cross-compiling for MinGW target:
> 
> In file included from common/connection.h:42,
>                  from common/game.h:29,
>                  from common/connection.c:45:
> common/fc_types.h:438: error: expected identifier before numeric constant
> 
> fc_types.h:438 is
> enum road_compat { RC_ROAD, RC_RAILROAD, RC_NONE };
> 
> I assume that this is namespace conflict, e.g., RC_NONE being already defined
> numeric constant in some system header.

hum, let be pedantic
we are not using c++ compiler, we have no namespace.
we have scope, compilation unit scope.

identifier declare in an enumeration are "reserved word" within in scope
like tokens "if", "then", or "else".

poor man namespace, that is RC_ used like RC:: would be more usefull
if they can be more readable, if you read it 6 months later.

C compiler were working on 16KB computer, that is to say that many
legacy programs use very short name or were limited to five/seven
characters.  Do not make that mistake(i would suggest).

So we have poor-man namespace collision, lets change it.
- is compat a name qualifier that i would used, do we have compatibilty
  issues.
- we are in fc_types, sure type is there to increase checking of the
  program, but it also increase ease of reading, if used wisely.

we have identifier collision, it need to be resolve.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to