RFC: May <inttypes.h> be used by testcases of the C-testsuite?
Joseph S. Myers
joseph@codesourcery.com
Thu May 5 18:28:00 GMT 2005
On Thu, 5 May 2005, you wrote:
> Would it be ok to make use of inttypes.h in testcases of the C-testsuite?
No, it is a C99 hosted-only header which GCC does not provide and many
targets do not provide. The exception is gcc.dg/intmax_t-1.c which
deliberately uses the system inttypes.h in the hope of detecting whether
GCC's intmax_t is wrong.
Feel free to work out how to fix bug 448 (implementing <stdint.h> in GCC)
and then use <stdint.h>. Geoff Keating had a problem implementing his
pragma approach, that the pragma would need to define macros but would be
handled too late to do so with lexing up front as used by the C++ front
end <http://gcc.gnu.org/ml/gcc/2004-11/msg00277.html>. I think you want
to implement Zack's proposal to split GCC's internal include directories
<http://gcc.gnu.org/ml/gcc/2004-11/msg00254.html> first to reduce problems
with compatibility with existing system headers (though you still need to
do a fair amount of work to keep the definitions the same as those systems
already have and to ensure compatibility with <inttypes.h> on systems
which only have that).
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
More information about the Gcc
mailing list