Gxxweak this macro is defined when compiling a c

Info icon This preview shows pages 34–37. Sign up to view the full content.

View Full Document Right Arrow Icon
__GXX_WEAK__ This macro is defined when compiling a C ++ source file. It has the value 1 if the compiler will use weak symbols, COMDAT sections, or other similar techniques to collapse symbols with “vague linkage” that are defined in multiple translation units. If the compiler will not collapse such symbols, this macro is defined with value 0. In general, user code should not need to make use of this macro; the purpose of this macro is to ease implementation of the C ++ runtime library provided with G ++ . __NEXT_RUNTIME__ This macro is defined, with value 1, if (and only if) the NeXT runtime (as in ‘ -fnext-runtime ’) is in use for Objective-C. If the GNU runtime is used,
Image of page 34

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

View Full Document Right Arrow Icon
Chapter 3: Macros 31 this macro is not defined, so that you can use this macro to determine which runtime (NeXT or GNU) is being used. __LP64__ _LP64 These macros are defined, with value 1, if (and only if) the compilation is for a target where long int and pointer both use 64-bits and int uses 32-bit. __SSP__ This macro is defined, with value 1, when ‘ -fstack-protector ’ is in use. __SSP_ALL__ This macro is defined, with value 2, when ‘ -fstack-protector-all ’ is in use. __SANITIZE_ADDRESS__ This macro is defined, with value 1, when ‘ -fsanitize=address ’ is in use. __TIMESTAMP__ This macro expands to a string constant that describes the date and time of the last modification of the current source file. The string constant contains abbreviated day of the week, month, day of the month, time in hh:mm:ss form, year and looks like "Sun Sep 16 01:03:52 1973" . If the day of the month is less than 10, it is padded with a space on the left. If GCC cannot determine the current date, it will emit a warning message (once per compilation) and __TIMESTAMP__ will expand to "??? ??? ?? ??:??:?? ????" . __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 These macros are defined when the target processor supports atomic compare and swap operations on operands 1, 2, 4, 8 or 16 bytes in length, respectively. __GCC_HAVE_DWARF2_CFI_ASM This macro is defined when the compiler is emitting Dwarf2 CFI directives to the assembler. When this is defined, it is possible to emit those same directives in inline assembly. __FP_FAST_FMA __FP_FAST_FMAF __FP_FAST_FMAL These macros are defined with value 1 if the backend supports the fma , fmaf , and fmal builtin functions, so that the include file ‘ math.h ’ can define the macros FP_FAST_FMA , FP_FAST_FMAF , and FP_FAST_FMAL for compatibility with the 1999 C standard. 3.7.3 System-specific Predefined Macros The C preprocessor normally predefines several macros that indicate what type of system and machine is in use. They are obviously different on each target supported by GCC. This manual, being for all systems and machines, cannot tell you what their names are, but you can use cpp -dM to see them all. See Chapter 12 [Invocation], page 56 . All system-specific
Image of page 35
Chapter 3: Macros 32 predefined macros expand to a constant value, so you can test them with either ‘ #ifdef or ‘ #if ’.
Image of page 36

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

View Full Document Right Arrow Icon
Image of page 37
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