public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* I would like to help implement stdint.h
@ 2003-10-11  4:56 Jason Catena
  2003-10-11 18:17 ` Joseph S. Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Catena @ 2003-10-11  4:56 UTC (permalink / raw)
  To: gcc


* Goal and approach

I read on your C99 feature status page that "extended integer types in
<stdint.h>" is missing. I would like to help work on this, since I
believe this is a very important feature of the standard that will
significantly increase C program portability.

Since stdint.h is platform-dependent, I was thinking of writing a
small program that would translate a description of the type sizes on
the target to a finished stdint.h file. Alternately, I could create a
library of stdint.h files, but it seems more efficient and flexible to
create it in the fly.

I have a hardcopy and a soft copy of the standard, but my copy does
not include TC1, so I will probably have to pick up the combined book
from the bookstore. I heard that there were a lot of changes to
stdint.h in TC1. I also have Harbison/Steele's fifth edition of _C: A
Reference Manual_, and Rex Jaeschke's _The Dictionary of Standard C_.

I also have to go read the GNU Coding Standard. :)

* My experience with stdint.h

I've been working with code for a decade that has gone through several
major platform changes, and I've found that bit length of types is a
significant porting problem, especially when only one component of a
custom network upgrades to a 64-bit processor, but has to use the same
types as the other components. It's better to state how many bits you
need than hope that you have enough, or that more bits in your type
does not break anything.

I wrote a draft of parts of this file (primarily u/int*_t) for the
codebase at work (Motorola) since all of the system headers seem to be
written against an early version of the standard. I had to put hacks
in my stdint.h to turn off Tandem, Alpha and Solaris' int_types.h.
Our codebase's alternative simply renamed the types (eg, typedef Ulong
unsigned long:(.

* About me

I am running Red Hat Linux 9 at home, so I should be able to
participate through CVS.

I may have to get a Motorola lawyer to sign away my contibutions to
GCC, even if I do it on my own time.

Please let me know if I can be of help, and what further information I
will need to contribute. I found a bug in bugzilla that talks about
stdint.h, but I don't know how well this reflects current thinking.

I have not contributed to GCC or an open-source project before, so I
need to get up to speed with this. I have been writing C since 1991,
and I am fond of f/lex (and bison/yacc where needed) to parse input
data). I'm less strong on C++ and Java. But I could probably write a
shell script to do the translation if necessary.

Regards,
Jason Catena

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-11 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-11  4:56 I would like to help implement stdint.h Jason Catena
2003-10-11 18:17 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).