Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spl/c-type-sizes
A simple C program to print type sizes
https://github.com/spl/c-type-sizes
c types
Last synced: 1 day ago
JSON representation
A simple C program to print type sizes
- Host: GitHub
- URL: https://github.com/spl/c-type-sizes
- Owner: spl
- Created: 2014-10-10T09:27:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-22T11:13:21.000Z (over 9 years ago)
- Last Synced: 2024-05-09T14:56:16.629Z (8 months ago)
- Topics: c, types
- Language: C
- Size: 191 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C Type Sizes
I'm occasionally wondering what the sizes of C types are on my machine. This
[program](./main.c) prints out the sizes of primitive types and `stdint.h`
types.I've written this program before, and I didn't want to write it again. Consider
this my final word on the matter.But it's not the final word on the subject. Ultimately, I'd like to have this be
a very portable (but still simple) program that runs on any machine and prints
out all the useful types for that architecture and compiler.Possible improvements:
* Add more useful types
* Display compiler and architecture information
* Support compilers other than `cc`
* Support Microsoft Windows/Visual Studio (which I don't have)
* Make `stdint.h` use optional for systems without itPull requests welcome!