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 |
|---|---|---|
| .. | ||
| Wbad-function-cast-1.c | Loading commit data... | |
| Wtraditional-conversion-2.c | Loading commit data... | |
| altivec-types.c | Loading commit data... | |
| builtin-complex.c | Loading commit data... | |
| builtin-tgmath-dfp-err.c | Loading commit data... | |
| builtin-tgmath-dfp.c | Loading commit data... | |
| c2x-builtins-dfp-1.c | Loading commit data... | |
| cast-bad.c | Loading commit data... | |
| composite-type.c | Loading commit data... | |
| constants-c99.c | Loading commit data... | |
| constants-hex.c | Loading commit data... | |
| constants-pedantic.c | Loading commit data... | |
| constants.c | Loading commit data... | |
| convert-complex.c | Loading commit data... | |
| convert-dfp-round-thread.c | Loading commit data... | |
| convert-dfp-round.c | Loading commit data... | |
| ctypes.c | Loading commit data... | |
| ddmode-ice.c | Loading commit data... | |
| dec-eval-method-2.c | Loading commit data... | |
| dec-eval-method.c | Loading commit data... | |
| decfloat-constants.c | Loading commit data... | |
| dfp-dbg.h | Loading commit data... | |
| dfp-except.h | Loading commit data... | |
| dfp-round.h | Loading commit data... | |
| dfp.exp | Loading commit data... | |
| fe-binop.c | Loading commit data... | |
| fe-check.h | Loading commit data... | |
| fe-convert-1.c | Loading commit data... | |
| fe-convert-2.c | Loading commit data... | |
| fe-convert-3.c | Loading commit data... | |
| float-constant-double.c | Loading commit data... | |
| floatn.c | Loading commit data... | |
| keywords-c89.c | Loading commit data... | |
| keywords-c99.c | Loading commit data... | |
| keywords-ignored-c99.c | Loading commit data... | |
| keywords-pedantic.c | Loading commit data... | |
| keywords-reserved.c | Loading commit data... | |
| operator-bitwise.c | Loading commit data... | |
| pr31344.c | Loading commit data... | |
| pr37435.c | Loading commit data... | |
| pr41049.c | Loading commit data... | |
| pr48204.c | Loading commit data... | |
| pr48928.c | Loading commit data... | |
| pr52140.c | Loading commit data... | |
| pr70052.c | Loading commit data... | |
| pr79487.c | Loading commit data... | |
| pr79515.c | Loading commit data... | |
| pragma-float-const-decimal64-1.c | Loading commit data... | |
| pragma-float-const-decimal64-2.c | Loading commit data... | |
| pragma-float-const-decimal64-3.c | Loading commit data... | |
| pragma-float-const-decimal64-4.c | Loading commit data... | |
| pragma-float-const-decimal64-5.c | Loading commit data... | |
| pragma-float-const-decimal64-6.c | Loading commit data... | |
| pragma-float-const-decimal64-7.c | Loading commit data... | |
| pragma-float-const-decimal64-8.c | Loading commit data... | |
| struct-union.c | Loading commit data... | |
| typespec.c | Loading commit data... | |
| union-init.c | Loading commit data... | |
| usual-arith-conv-bad-2.c | Loading commit data... | |
| usual-arith-conv-bad-3.c | Loading commit data... | |
| usual-arith-conv-bad.c | Loading commit data... | |
| warn-abs-2.c | Loading commit data... | |
| wtr-conversion-1.c | Loading commit data... |