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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| ada | Loading commit data... | |
| brig.dg | Loading commit data... | |
| c-c++-common | Loading commit data... | |
| config | Loading commit data... | |
| g++.dg | Loading commit data... | |
| g++.old-deja | Loading commit data... | |
| g++.target | Loading commit data... | |
| gcc.c-torture | Loading commit data... | |
| gcc.dg | Loading commit data... | |
| gcc.dg-selftests | Loading commit data... | |
| gcc.misc-tests | Loading commit data... | |
| gcc.src | Loading commit data... | |
| gcc.target | Loading commit data... | |
| gcc.test-framework | Loading commit data... | |
| gdc.dg | Loading commit data... | |
| gdc.test | Loading commit data... | |
| gfortran.dg | Loading commit data... | |
| gfortran.fortran-torture | Loading commit data... | |
| gnat.dg | Loading commit data... | |
| go.dg | Loading commit data... | |
| go.go-torture/execute | Loading commit data... | |
| go.test | Loading commit data... | |
| jit.dg | Loading commit data... | |
| lib | Loading commit data... | |
| obj-c++.dg | Loading commit data... | |
| objc | Loading commit data... | |
| objc-obj-c++-shared | Loading commit data... | |
| objc.dg | Loading commit data... | |
| selftests | Loading commit data... | |
| .gitattributes | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| ChangeLog-1993-2007 | Loading commit data... | |
| ChangeLog-2008 | Loading commit data... | |
| ChangeLog-2009 | Loading commit data... | |
| ChangeLog-2010 | Loading commit data... | |
| ChangeLog-2011 | Loading commit data... | |
| ChangeLog-2012 | Loading commit data... | |
| ChangeLog-2013 | Loading commit data... | |
| ChangeLog-2014 | Loading commit data... | |
| ChangeLog-2015 | Loading commit data... | |
| ChangeLog-2016 | Loading commit data... | |
| ChangeLog-2017 | Loading commit data... | |
| ChangeLog-2018 | Loading commit data... | |
| ChangeLog.graphite | Loading commit data... | |
| ChangeLog.jit | Loading commit data... | |
| ChangeLog.ptr | Loading commit data... | |
| ChangeLog.tree-ssa | Loading commit data... | |
| README | Loading commit data... | |
| README.compat | Loading commit data... | |
| README.gcc | Loading commit data... |