From: "François-Xavier Coudert" <fxcoudert@gmail.com>
To: gcc@gcc.gnu.org, patch <gcc-patches@gcc.gnu.org>
Subject: Add clog10 to builtins.def, round 2
Date: Wed, 29 Jun 2005 21:51:00 -0000 [thread overview]
Message-ID: <19c433eb050629145115f1eb07@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
The fortran front-end needs to recognize clog10, clog10f and clog10l a
proper built-ins. Attached patch tries to add them to clog10, under a
new category: DEF_EXT_C99RES_BUILTIN (as suggested by jsm28).
Can someone review this? Is it OK?
Thanks,
François-Xavier
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: clog10.diff --]
[-- Type: text/x-patch; name="clog10.diff", Size: 2087 bytes --]
Index: gcc/builtins.def
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/builtins.def,v
retrieving revision 1.104
diff -u -3 -p -r1.104 builtins.def
--- gcc/builtins.def 25 Jun 2005 01:59:13 -0000 1.104
+++ gcc/builtins.def 29 Jun 2005 21:25:38 -0000
@@ -119,6 +119,13 @@ Software Foundation, 51 Franklin Street,
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS, true)
+/* Builtin that C99 reserve the name for future use. We can still recognize
+ the builtin in C99 mode but we can't produce it implicitly. */
+#undef DEF_EXT_C99RES_BUILTIN
+#define DEF_EXT_C99RES_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
+ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ true, true, true, ATTRS, false, true)
+
/* Allocate the enum and the name for a builtin, but do not actually
define it here at all. */
#undef DEF_BUILTIN_STUB
@@ -436,6 +443,9 @@ DEF_C99_BUILTIN (BUILT_IN_CIMAGL,
DEF_C99_BUILTIN (BUILT_IN_CLOG, "clog", BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, ATTR_MATHFN_FPROUNDING)
DEF_C99_BUILTIN (BUILT_IN_CLOGF, "clogf", BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT, ATTR_MATHFN_FPROUNDING)
DEF_C99_BUILTIN (BUILT_IN_CLOGL, "clogl", BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE, ATTR_MATHFN_FPROUNDING)
+DEF_EXT_C99RES_BUILTIN (BUILT_IN_CLOG10, "clog10", BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, ATTR_MATHFN_FPROUNDING)
+DEF_EXT_C99RES_BUILTIN (BUILT_IN_CLOG10F, "clog10f", BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT, ATTR_MATHFN_FPROUNDING)
+DEF_EXT_C99RES_BUILTIN (BUILT_IN_CLOG10L, "clog10l", BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE, ATTR_MATHFN_FPROUNDING)
DEF_C99_BUILTIN (BUILT_IN_CONJ, "conj", BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN (BUILT_IN_CONJF, "conjf", BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT, ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN (BUILT_IN_CONJL, "conjl", BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE, ATTR_CONST_NOTHROW_LIST)
next reply other threads:[~2005-06-29 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 21:51 François-Xavier Coudert [this message]
2005-07-03 6:53 ` FX Coudert
2005-07-19 8:46 ` FX Coudert
2005-07-21 20:06 ` Richard Henderson
2005-07-24 8:36 ` François-Xavier Coudert
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=19c433eb050629145115f1eb07@mail.gmail.com \
--to=fxcoudert@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc@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).