From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org, Binutils <binutils@sourceware.org>
Cc: Alan Modra <amodra@gmail.com>
Subject: [PATCH] Remove non-ANSI C macros in ansidecl.h.
Date: Tue, 10 May 2022 10:57:47 +0200 [thread overview]
Message-ID: <ae355162-80bf-e241-866c-fa633d16cdaa@suse.cz> (raw)
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
@Alan: Are you fine with the change from binutils/gdb perspective?
Thanks,
Martin
include/ChangeLog:
* ansidecl.h (PTR): Remove.
(const): Likewise.
(volatile): Likewise.
(signed): Likewise.
---
include/ansidecl.h | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
diff --git a/include/ansidecl.h b/include/ansidecl.h
index efee5b6904b..76ff868a128 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -16,18 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-/* ANSI and traditional C compatibility macros
-
- ANSI C is assumed if __STDC__ is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- const not defined `'
- volatile not defined `'
- signed not defined `'
-
- For ease of writing code which uses GCC extensions but needs to be
+/* For ease of writing code which uses GCC extensions but needs to be
portable to other compilers, we provide the GCC_VERSION macro that
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
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. */
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
-/* All known AIX compilers implement these things (but don't always
- define __STDC__). The RISC/OS MIPS compiler defines these things
- in SVR4 mode, but does not define __STDC__. */
-/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
- C++ compilers, does not define __STDC__, though it acts as if this
- was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
-
-#define PTR void *
-
-#undef const
-#undef volatile
-#undef signed
-
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
it too, but it's not in C89. */
#undef inline
--
2.36.0
next reply other threads:[~2022-05-10 8:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 8:57 Martin Liška [this message]
2022-05-10 9:55 ` Andreas Schwab
2022-05-10 10:51 ` Martin Liška
2022-05-10 13:37 ` Jeff Law
2022-05-10 14:09 ` Alan Modra
2022-05-10 14:10 ` Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae355162-80bf-e241-866c-fa633d16cdaa@suse.cz \
--to=mliska@suse.cz \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).