From 024a85aeb6a912811d917f737eaad39140c2fb0c Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Wed, 24 Jan 2007 12:03:38 +0000 Subject: c-cppbuiltin.c (builtin_define_type_sizeof): New function. 2007-01-24 Andreas Krebbel * c-cppbuiltin.c (builtin_define_type_sizeof): New function. (c_cpp_builtins): New builtin macros: __SIZEOF_INT__, __SIZEOF_LONG__, __SIZEOF_LONG_LONG__, __SIZEOF_SHORT__, __SIZEOF_POINTER__, __SIZEOF_FLOAT__, __SIZEOF_DOUBLE__, __SIZEOF_LONG_DOUBLE__, __SIZEOF_SIZE_T__, __SIZEOF_WCHAR_T__, __SIZEOF_WINT_T__ and __SIZEOF_PTRDIFF_T__. * doc/cpp.texi: Documentation for the new builtin macros added. 2007-01-24 Andreas Krebbel * gcc.c-torture/compile/sizeof-macros-1.c: New testcase. From-SVN: r121107 --- gcc/doc/cpp.texi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 1b7b867..90ff230 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2079,6 +2079,23 @@ respectively. They exist to make the standard header given numerical limits work correctly. You should not use these macros directly; instead, include the appropriate headers. +@item __SIZEOF_INT__ +@itemx __SIZEOF_LONG__ +@itemx __SIZEOF_LONG_LONG__ +@itemx __SIZEOF_SHORT__ +@itemx __SIZEOF_POINTER__ +@itemx __SIZEOF_FLOAT__ +@itemx __SIZEOF_DOUBLE__ +@itemx __SIZEOF_LONG_DOUBLE__ +@itemx __SIZEOF_SIZE_T__ +@itemx __SIZEOF_WCHAR_T__ +@itemx __SIZEOF_WINT_T__ +@itemx __SIZEOF_PTRDIFF_T__ +Defined to the number of bytes of the C standard data types: @code{int}, +@code{long}, @code{long long}, @code{short}, @code{void *}, @code{float}, +@code{double}, @code{long double}, @code{size_t}, @code{wchar_t}, @code{wint_t} +and @code{ptrdiff_t}. + @item __DEPRECATED This macro is defined, with value 1, when compiling a C++ source file with warnings about deprecated constructs enabled. These warnings are -- cgit v1.1