From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3485 invoked by alias); 19 Aug 2004 22:12:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3474 invoked by uid 48); 19 Aug 2004 22:12:17 -0000 Date: Thu, 19 Aug 2004 22:12:00 -0000 Message-ID: <20040819221217.3473.qmail@sourceware.org> From: "geoffk at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20000807074601.448.jsm-gccbugs@polyomino.org.uk> References: <20000807074601.448.jsm-gccbugs@polyomino.org.uk> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/448] -related issues (C99 issues) X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02018.txt.bz2 List-Id: ------- 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