creating a new integer type in C (incompatible with other types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

With GCC, in C, is they a way to create a new integer type,
incompatible with other types?

For instance, a new integer type that would have the same size
as long int, but that would be incompatible with it. On a 64-bit
platform, one could use long long int, but if one wants to create
3 or more types similar to long int, one would need some other
method.

The main goal would be to improve the robustness of the code
by detecting programming errors at compile time, without making
testing much complex to achieve this goal.

Note: The code to be tested must have minimal changes, so that
encapsulating an integer type in a struct is not possible. And
this must be C, not C++.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux