Changeset 5200:8648a10bca82 in roaraudio


Ignore:
Timestamp:
10/23/11 14:21:53 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

gcc is bad, attribute((nonnull)) changes optimizer behavor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/roaraudio/compilerhacks.h

    r5111 r5200  
    3232#if defined(__GNUC__) && __GNUC__ >= 4 
    3333#define _LIBROAR_ATTR_DEPRECATED        __attribute__((deprecated)) 
     34#define _LIBROAR_ATTR_PURE              __attribute__ ((pure)) 
     35#define _LIBROAR_ATTR_USE_RESULT        __attribute__ ((warn_unused_result)) 
     36 
     37// gcc does not only add a warning on NULL argument for the following 
     38// but also asumes they are never NULL (but alloes them to be NULL) 
     39// and breaks our check this way. 
     40#if 0 
    3441#define _LIBROAR_ATTR_NONNULL(x, index...) __attribute__((nonnull ( x, ##index ))) 
    3542#define _LIBROAR_ATTR_NONNULL_ALL       __attribute__((nonnull)) 
    36 #define _LIBROAR_ATTR_PURE              __attribute__ ((pure)) 
    37 #define _LIBROAR_ATTR_USE_RESULT        __attribute__ ((warn_unused_result)) 
     43#endif 
    3844#endif 
    3945 
Note: See TracChangeset for help on using the changeset viewer.