KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
cdefs.h File Reference

Definitions for builtin attributes and compiler directives. More...

#include <sys/cdefs.h>

Go to the source code of this file.

Macros

#define __noreturn   __attribute__((__noreturn__))
 Identify a function that will never return.
 
#define __pure   __attribute__((__const__))
 Identify a function that has no side effects other than its return, and only uses its arguments for any work.
 
#define __unused   __attribute__((__unused__))
 Identify a function or variable that may be unused.
 
#define __used   __attribute__((used))
 Prevent a symbol from being removed from the binary.
 
#define __weak   __attribute__((weak))
 Identify a function or variable that may be overridden by another symbol.
 
#define __dead2   __noreturn /* BSD compat */
 Alias for __noreturn.
 
#define __pure2   __pure /* ditto */
 Alias for __pure.
 
#define __likely(exp)
 Directive to inform the compiler the condition is in the likely path.
 
#define __unlikely(exp)
 Directive to inform the compiler the condition is in the unlikely path.
 
#define __deprecated   __attribute__((deprecated))
 Mark something as deprecated.
 
#define __depr(m)
 Mark something as deprecated, with an informative message.
 
#define __printflike(fmtarg, firstvararg)
 Identify a function as accepting formatting like printf().
 
#define __scanflike(fmtarg, firstvararg)
 Identify a function as accepting formatting like scanf().
 
#define __fallthrough   /* Fall through */
 
#define __always_inline   inline __attribute__((__always_inline__))
 Ask the compiler to always inline a given function.
 
#define __no_inline   __attribute__((__noinline__))
 Ask the compiler to never inline a given function.
 
#define __RESTRICT
 
#define __extension__
 
#define inline   __inline__
 

Detailed Description

Definitions for builtin attributes and compiler directives.

This file contains definitions of various attribute directives in shorter forms for use in programs. These typically aid in optimizations or provide the compiler with extra information about a symbol.

Author
Megan Potter
Lawrence Sebald
Falco Girgis