diff options
| author | Eric Wong <normalperson@yhbt.net> | 2025-10-30 20:03:00 -0700 |
|---|---|---|
| committer | Collin Funk <collin.funk1@gmail.com> | 2025-10-30 20:03:00 -0700 |
| commit | 3ac0112b5daa59407f1bedc3b6a6830b6ff00326 (patch) | |
| tree | fa5fb18751281db92f0574acf8dd1f0354f0f394 /misc/sys | |
| parent | 3fe3f6283302b99b5b2d1615b2a76d20ec791556 (diff) | |
cdefs: allow __attribute__ on tcc
According to the tcc (tiny C compiler) Changelog, tcc supports
__attribute__ since 0.9.3. Looking at history of tcc at
<https://repo.or.cz/tinycc.git>, __attribute__ support was added
in commit 14658993425878be300aae2e879560698e0c6c4c on 2002-01-03,
which also looks like the release of 0.9.3. While I'm unable to
find release tags for tcc before 0.9.18 (2003-04-14), the next
release (0.9.28) will include __attribute__((cleanup(func)) which
I rely on.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Diffstat (limited to 'misc/sys')
| -rw-r--r-- | misc/sys/cdefs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 215ff937ee..f74671086e 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -438,10 +438,10 @@ */ #endif -/* GCC and clang have various useful declarations that can be made with - the '__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !(defined __GNUC__ || defined __clang__) +/* GCC, clang, and compatible compilers have various useful declarations + that can be made with the '__attribute__' syntax. All of the ways we use + this do fine if they are omitted for compilers that don't understand it. */ +#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__) # define __attribute__(xyz) /* Ignore */ #endif |
