joeylib2/make/support/be/gcc2Attributes.h
2026-10-13 14:01:46 -05:00

21 lines
897 B
C

// Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
// See LICENSE.md for license information.
// SPDX-License-Identifier: MIT
//
// gcc2Attributes.h - force-included into every gcc 2.95 compile by
// make/support/be/gcc2.sh. JoeyLib's sources use three GCC attributes that
// came with gcc 3.1 and 3.3, which gcc 2.95 would warn away (and -Werror
// stop). Each name becomes __unused__, an attribute gcc 2.95 knows and that
// changes nothing here (an empty name would leave an empty slot in the
// attribute list, which crashes gcc 2.95). Nothing is lost: gcc 2.95
// inlines no differently for them, and strict aliasing, which may_alias
// guards against, is off for every gcc 2.95 compile.
#ifndef JOEYLIB_GCC2_ATTRIBUTES_H
#define JOEYLIB_GCC2_ATTRIBUTES_H
#define always_inline __unused__
#define may_alias __unused__
#define noinline __unused__
#endif