[Bug 1556] rfs type defs violate type naming conventions

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Tue Jun 15 05:12:44 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1556





--- Comment #5 from Ralf Corsepius <ralf.corsepius at rtems.org>  2010-06-15 00:12:42 ---
> Does the _t apply to all typedefs ?
As far as POSIX is concerned, pedantically speaking yes. 
In RTEMS, things are a bit inconsistent.


That said, I don't have much of a problem with RTEMS using
typedef struct _xxxx {...} xxxx;
or
typedef struct xxxx_s {...} xxxx;
[NB: This is trivial to implement with a sed script]

My point only is that
typedef struct xxxx_t {...} xxxx;
is confusing to users and inconsistent with POSIX.



Wrt.
 typedef struct xxx {...} yyy; 
vs.
 typedef struct {...} yyy;

* the "struct xxx" is necessary for forward decls. I don't have a strong
opinion on whether "always adding it" or "add only if neccessary".

* the "struct xxx" is necessary to support really old C-compilers/C-variants.
I don't recall when this limitation was lifted from C, but it was many years
ago. Could easily be the KnR->c89 switch.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list