VirtualBox

Changeset 55071 in vbox


Ignore:
Timestamp:
Apr 1, 2015 1:09:10 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99362
Message:

iprt/cdefs: use this magic with gcc >= 4.4 as it may trigger the generation of static initializers with older compilers, see xtracker 7775

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r54455 r55071  
    15341534 * compiler stuff and thus can use variables in arrays the structure may
    15351535 * contain. This is useful to determine the sizes of structures ending
    1536  * with a variable length field.
     1536 * with a variable length field. For gcc >= 4.4 see @bugref{7775}.
    15371537 *
    15381538 * @returns offset into the structure of the specified member. signed.
     
    15401540 * @param   member  Member.
    15411541 */
    1542 #if defined(__GNUC__) && defined(__cplusplus) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
     1542#if defined(__GNUC__) && defined(__cplusplus) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
    15431543# define RT_OFFSETOF(type, member)              ( (int)(uintptr_t)&( ((type *)(void *)0x1000)->member) - 0x1000 )
    15441544#else
     
    15521552 * compiler stuff and thus can use variables in arrays the structure may
    15531553 * contain. This is useful to determine the sizes of structures ending
    1554  * with a variable length field.
     1554 * with a variable length field. For gcc >= 4.4 see @bugref{7775}.
    15551555 *
    15561556 * @returns offset into the structure of the specified member. unsigned.
     
    15581558 * @param   member  Member.
    15591559 */
    1560 #if defined(__GNUC__) && defined(__cplusplus) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
     1560#if defined(__GNUC__) && defined(__cplusplus) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
    15611561# define RT_UOFFSETOF(type, member)             ( (uintptr_t)&( ((type *)(void *)0x1000)->member) - 0x1000 )
    15621562#else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette