[GRASS-dev] Is `typedef struct` considered as a bad practice?

Hi C devs,

is following considered wrong in GRASS code?

typedef struct Point {
int x;
int y;
} Point;

/* alternatively */
typedef struct {
int x;
int y;
} Point;

I just saw r58957 and r49886 but till now I thought that typedefs (at the same time as struct definition) are allowed or even preferred since they are shorter. From C++ point of view struct Point is obsolete syntax which does not help anybody, both compiler and programmer knows what is Point.

There is nothing about this is SUBMITTING or referred GNU Coding Standards (at least I don’t see anything).

Vaclav

http://trac.osgeo.org/grass/changeset/49886
http://trac.osgeo.org/grass/changeset/58957

As a general principle, structure tags are preferred over typedefs.
However, GRASS has a long history of not being particularly fussy
about coding standards, so you will find plenty of counterexamples.

--
Glynn Clements <glynn@gclements.plus.com>