Test size and signedness of standard types like size_t, int16_t, ...
CompiletimeTest StdTypes | Test size and signedness of standard types like size_t, int16_t, ... |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file of CompiletimeTest StdTypes. |
C-kern/ | Included from Compiletime-Tests. |
sizeof(char) Test | Asserts that sizeof(char) is 1 byte. |
int_t Test | Asserts that all integer standard types have the correct size and signedness. |
limit Test | Asserts that all application defined limits (OFF_MAX) of the standard types have the correct value. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2011 Jörg Seebohn
Header file of CompiletimeTest StdTypes.
Included from Compiletime-Tests.
Asserts that sizeof(char) is 1 byte. Some components managing space rely uppon the fact that sizeof(cahr) is one. Mostly used as a “+ 1” in sizeof calculations for storage size of strings. Or in calculations where a string ius allocated after the a structure:
size_t memsize = sizeof(type_t) + strlen(string) + 1
Asserts that all application defined limits (OFF_MAX) of the standard types have the correct value.
Declares the maximum value of type off_t.
#define OFF_MAX INT64_MAX