public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "geoffk at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/448] <stdint.h>-related issues (C99 issues)
Date: Thu, 19 Aug 2004 22:12:00 -0000	[thread overview]
Message-ID: <20040819221217.3473.qmail@sourceware.org> (raw)
In-Reply-To: <20000807074601.448.jsm-gccbugs@polyomino.org.uk>


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-08-19 22:12 -------
My suggestion on how to implement this is to have stdint.h essentially contain a single line,

#pragma GNUC stdint

which defines the typedefs based on information in the machine description.  That information doesn't 
exist yet, so you'd have to add it, with suitable defaults computed from the sizes of the types (perhaps 
using the same algorithm that __attribute__((mode)) uses.  The information has to match the system's 
idea from inttypes.h, including such details as 'long' vs. 'int' even if they are both the same size.

On some systems, the same types can be defined in other headers, so the #pragma would need to only 
define a particular type if it hasn't been defined already.

You could theoretically do this with a huge collection of preprocessor macros, like stddef.h or limits.h, 
but this would be pretty painful, so don't.

A good testcase is to use -Wall and check that all the PRI* and SCN* macros from inttypes.h don't 
produce warnings when used in scanf and printf with the correct type.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=448


  parent reply	other threads:[~2004-08-19 22:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20000807074601.448.jsm-gccbugs@polyomino.org.uk>
2004-08-02 12:14 ` papadopo at shfj dot cea dot fr
2004-08-02 16:33 ` jsm at polyomino dot org dot uk
2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
2004-08-19 22:12 ` geoffk at gcc dot gnu dot org [this message]
2004-08-19 22:27 ` jsm at polyomino dot org dot uk
2004-09-24 22:31 ` jsm28 at gcc dot gnu dot org
     [not found] <bug-448-230@http.gcc.gnu.org/bugzilla/>
2006-10-18 12:31 ` fxcoudert at gcc dot gnu dot org
2008-04-15 19:38 ` bkoz at gcc dot gnu dot org
2008-04-15 19:45 ` jsm28 at gcc dot gnu dot org
2008-04-18 14:16 ` jsm28 at gcc dot gnu dot org
2008-11-08  0:17 ` jsm28 at gcc dot gnu dot org
2009-03-31 20:31 ` jsm28 at gcc dot gnu dot org
2009-03-31 20:33 ` jsm28 at gcc dot gnu dot org
2009-04-01 13:25 ` dominiq at lps dot ens dot fr
2009-04-01 14:26 ` joseph at codesourcery dot com
2009-04-08  6:55 ` hp at gcc dot gnu dot org
2009-04-08 15:49 ` joseph at codesourcery dot com
2009-04-08 20:05 ` hp at gcc dot gnu dot org
2009-07-31 12:41 ` paolo dot carlini at oracle dot com
2009-07-31 12:54 ` joseph at codesourcery dot com
2009-07-31 13:04 ` paolo dot carlini at oracle dot com
2009-07-31 13:10 ` joseph at codesourcery dot com
2009-07-31 13:15 ` paolo dot carlini at oracle dot com
2009-07-31 13:57 ` paolo dot carlini at oracle dot com
2009-12-08 17:09 ` jsm28 at gcc dot gnu dot org
2009-12-27 13:38 ` laurent at guerby dot net
2009-12-27 18:33 ` joseph at codesourcery dot com
2009-12-27 18:37 ` joseph at codesourcery dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040819221217.3473.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).