diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-10-04 17:08:06 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2019-10-04 17:08:06 +0100 |
commit | 0fa00483026f58848767c1577e3d76ef2fb2568b (patch) | |
tree | bf97b85148031f1f5d2fad140a077c0d069e516b /gcc/ada | |
parent | 0046f8d750560275c3d82179244b45412073d626 (diff) | |
download | gcc-0fa00483026f58848767c1577e3d76ef2fb2568b.zip gcc-0fa00483026f58848767c1577e3d76ef2fb2568b.tar.gz gcc-0fa00483026f58848767c1577e3d76ef2fb2568b.tar.bz2 |
Mark C2x built-in functions as such.
Various built-in functions that GCC has as extensions are now standard
functions in C2x. This patch adds DEF_C2X_BUILTIN and uses it to mark
them as such. Some of the so-marked functions were previously
DEF_EXT_LIB_BUILTIN, while some DFP ones were DEF_GCC_BUILTIN
(i.e. __builtin_* only); both sets become DEF_C2X_BUILTIN. This in
turn requires flag_isoc2x to be defined in various front ends using
builtins.def.
As the semantics of the built-in functions should already be tested,
the tests added only verify that they are declared in C2x mode but not
in C11 mode. The test of DFP built-in functions being declared for
C2x goes in gcc.dg/dfp/, as while such built-in functions currently
don't depend on whether DFP is supported, that looks like a bug to me
(see bug 91985), so it seems best for the tests not to depend on
exactly how that bug might be fixed.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
gcc:
* builtins.def (DEF_C2X_BUILTIN): New macro.
(exp10, exp10f, exp10l, fabsd32, fabsd64, fabsd128, nand32)
(nand64, nand128, roundeven, roundevenf, roundevenl, strdup)
(strndup): Use DEF_C2X_BUILTIN.
* coretypes.h (enum function_class): Add function_c2x_misc.
gcc/ada:
* gcc-interface/utils.c (flag_isoc2x): New variable.
gcc/brig:
* brig-lang.c (flag_isoc2x): New variable.
gcc/lto:
* lto-lang.c (flag_isoc2x): New variable.
gcc/testsuite:
* gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c,
gcc.dg/dfp/c2x-builtins-dfp-1.c: New tests.
From-SVN: r276588
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6a84b7b..0463038 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Joseph Myers <joseph@codesourcery.com> + + * gcc-interface/utils.c (flag_isoc2x): New variable. + 2019-10-01 Maciej W. Rozycki <macro@wdc.com> * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable. diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index b9d5af7..d2891f2 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -6901,6 +6901,7 @@ def_builtin_1 (enum built_in_function fncode, static int flag_isoc94 = 0; static int flag_isoc99 = 0; static int flag_isoc11 = 0; +static int flag_isoc2x = 0; /* Install what the common builtins.def offers plus our local additions. |