Int8c int16c int32c int64c uint8c uint16c uint32c

Info icon This preview shows pages 33–35. Sign up to view the full content.

View Full Document Right Arrow Icon
__INT8_C __INT16_C __INT32_C __INT64_C __UINT8_C __UINT16_C __UINT32_C __UINT64_C __INTMAX_C __UINTMAX_C Defined to implementations of the standard ‘ stdint.h ’ macros with the same names without the leading __ . They exist the make the implementation of that header work correctly. You should not use these macros directly; instead, include the appropriate headers. Some of these macros may not be defined on particular systems if GCC does not provide a ‘ stdint.h ’ header on those systems. __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__ __SIZEOF_PTRDIFF_T__ Defined to the number of bytes of the C standard data types: int , long , long long , short , void * , float , double , long double , size_t , wchar_t , wint_t and ptrdiff_t . __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ __ORDER_BIG_ENDIAN__ __ORDER_PDP_ENDIAN__ __BYTE_ORDER__ is defined to one of the values __ORDER_LITTLE_ENDIAN__ , __ORDER_BIG_ENDIAN__ , or __ORDER_PDP_ENDIAN__ to reflect the layout of multi-byte and multi-word quantities in memory. If __BYTE_ORDER__ is equal to __ORDER_LITTLE_ENDIAN__ or __ORDER_BIG_ENDIAN__ , then multi-byte and
Image of page 33

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Chapter 3: Macros 30 multi-word quantities are laid out identically: the byte (word) at the lowest address is the least significant or most significant byte (word) of the quan- tity, respectively. If __BYTE_ORDER__ is equal to __ORDER_PDP_ENDIAN__ , then bytes in 16-bit words are laid out in a little-endian fashion, whereas the 16-bit subwords of a 32-bit quantity are laid out in big-endian fashion. You should use these macros for testing like this: /* Test for a little-endian machine */ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ __FLOAT_WORD_ORDER__ __FLOAT_WORD_ORDER__ is defined to one of the values __ORDER_LITTLE_ ENDIAN__ or __ORDER_BIG_ENDIAN__ to reflect the layout of the words of multi-word floating-point quantities. __DEPRECATED This macro is defined, with value 1, when compiling a C ++ source file with warnings about deprecated constructs enabled. These warnings are enabled by default, but can be disabled with ‘ -Wno-deprecated ’. __EXCEPTIONS This macro is defined, with value 1, when compiling a C ++ source file with exceptions enabled. If ‘ -fno-exceptions ’ is used when compiling the file, then this macro is not defined. __GXX_RTTI This macro is defined, with value 1, when compiling a C ++ source file with runtime type identification enabled. If ‘ -fno-rtti ’ is used when compiling the file, then this macro is not defined. __USING_SJLJ_EXCEPTIONS__ This macro is defined, with value 1, if the compiler uses the old mechanism based on setjmp and longjmp for exception handling. __GXX_EXPERIMENTAL_CXX0X__ This macro is defined when compiling a C ++ source file with the option -std=c++0x ’ or ‘ -std=gnu++0x ’. It indicates that some features likely to be included in C ++ 0x are available. Note that these features are experimental, and may change or be removed in future versions of GCC.
Image of page 34
Image of page 35
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern