-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flight: *_t is reserved by POSIX #1948
Comments
:/ this is one of those things that's technically true, but every project and coding standard violates-- I just grepped a dozen source trees including Linux, GCC, flightgear, Eigen, etc, and found it used as a preferred suffix for type names in each Can't we live with it? |
I think we can live with it but should avoid it without |
What do you think, add to style guide to generally avoid-- pios_whatever_t or in libraries subsystem_whatever_t ... and close this out? (And add no new violators) |
I like subsystem_whatever_t. |
Why do we need the _t suffix? Doesn't add any useful information AFAICT? It just exists to allow stdint.h etc. to avoid collisions with user types that existed first? |
No, _t predates stdint, etc. It meant "type"-- it puts things into a different namespace from identifiers, makes things easy to grep for, etc. Now the OS is kinda claiming it and some people agree, some people don't. |
It has been used a bit recently in flight code. We should probably avoid it to keep away from potential clashes in future. Should be fine with pios_ prefix though (even if not strictly ok).
Relates #1947
The text was updated successfully, but these errors were encountered: