summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-05-10 09:47:08 +0200
committerMartin Liska <mliska@suse.cz>2022-05-10 16:06:27 +0200
commit137da38377eb4ff53a71b199802a22d28c12d077 (patch)
treef84458edb9bd6334234e28cfc7bdf9eeaa91b584 /include
parentlibiberty: stop using PTR macro (diff)
downloadgcc-137da38377eb4ff53a71b199802a22d28c12d077.tar.gz
gcc-137da38377eb4ff53a71b199802a22d28c12d077.tar.bz2
gcc-137da38377eb4ff53a71b199802a22d28c12d077.tar.xz
Remove non-ANSI C macros in ansidecl.h.
include/ChangeLog: * ansidecl.h (PTR): Remove. (const): Likewise. (volatile): Likewise. (signed): Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/ansidecl.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h
index efee5b6904b..46fe3ffabd9 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -1,4 +1,4 @@
1/* ANSI and traditional C compatability macros 1/* Compiler compatibility macros
2 Copyright (C) 1991-2022 Free Software Foundation, Inc. 2 Copyright (C) 1991-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
@@ -16,18 +16,7 @@ You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software 16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 17Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
18 18
19/* ANSI and traditional C compatibility macros 19/* For ease of writing code which uses GCC extensions but needs to be
20
21 ANSI C is assumed if __STDC__ is #defined.
22
23 Macro ANSI C definition Traditional C definition
24 ----- ---- - ---------- ----------- - ----------
25 PTR `void *' `char *'
26 const not defined `'
27 volatile not defined `'
28 signed not defined `'
29
30 For ease of writing code which uses GCC extensions but needs to be
31 portable to other compilers, we provide the GCC_VERSION macro that 20 portable to other compilers, we provide the GCC_VERSION macro that
32 simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various 21 simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
33 wrappers around __attribute__. Also, __extension__ will be #defined 22 wrappers around __attribute__. Also, __extension__ will be #defined
@@ -62,19 +51,6 @@ So instead we use the macro below and test it against specific values. */
62#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) 51#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
63#endif /* GCC_VERSION */ 52#endif /* GCC_VERSION */
64 53
65/* All known AIX compilers implement these things (but don't always
66 define __STDC__). The RISC/OS MIPS compiler defines these things
67 in SVR4 mode, but does not define __STDC__. */
68/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
69 C++ compilers, does not define __STDC__, though it acts as if this
70 was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
71
72#define PTR void *
73
74#undef const
75#undef volatile
76#undef signed
77
78/* inline requires special treatment; it's in C99, and GCC >=2.7 supports 54/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
79 it too, but it's not in C89. */ 55 it too, but it's not in C89. */
80#undef inline 56#undef inline