SDL_DEPRECATED - Man Page

A macro to tag a symbol as deprecated.

Header File

Defined in SDL3/SDL_begin_code.h

Synopsis

#include "SDL3/SDL.h"

#define SDL_DEPRECATED __attribute__((deprecated))

Description

A function is marked deprecated by adding this macro to its declaration:

extern SDL_DEPRECATED int ThisFunctionWasABadIdea(void);

Compilers with deprecation support can give a warning when a deprecated function is used. This symbol may be used in SDL's headers, but apps are welcome to use it for their own interfaces as well.

SDL, on occasion, might deprecate a function for various reasons. However, SDL never removes symbols before major versions, so deprecated interfaces in SDL3 will remain available until SDL4, where it would be expected an app would have to take steps to migrate anyhow.

On compilers without a deprecation mechanism, this is defined to nothing, and using a deprecated function will not generate a warning.

Availability

This macro is available since SDL 3.2.0.

Info

SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS