mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Added define 'unused_' for '__attribute__((unused))'. The oldest version of GCC with online docs (GCC 2.95.3, released in March 16, 2001 [1]) already has support for this attribute, so it doesn't make sense to check the version. Renamed 'noreturn' to 'noreturn_' for consistency. [1] https://gcc.gnu.org/onlinedocs/ Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
23 lines
412 B
C
23 lines
412 B
C
/*
|
|
* This file is part of RGBDS.
|
|
*
|
|
* Copyright (c) 2014-2018, RGBDS contributors.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef HELPERS_H
|
|
#define HELPERS_H
|
|
|
|
#ifdef __GNUC__
|
|
/* GCC or compatible */
|
|
#define noreturn_ __attribute__ ((noreturn))
|
|
#define unused_ __attribute__ ((unused))
|
|
#else
|
|
/* Unsupported, but no need to throw a fit */
|
|
#define noreturn_
|
|
#define unused_
|
|
#endif
|
|
|
|
#endif /* HELPERS_H */
|