You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
thodnev edited this page Sep 26, 2017
·
1 revision
Below are listed and explained typical C-code pitfalls to avoid:
The usage of generic C-types (int, char, etc.):
When generic types are used for embedded projects, the code becomes substantially less portable because on different platforms the same type could have different bit sizes. The resulting errors could become hardly discovered and bring the developer hours of interesting debug sessions.
To avoid this, the C99 standard has a header with portable fixed-width types. The header is available for inclusion by the <stdint.h> name (or cstdint in C++).
For more, follow this wiki link.