From 8441841a1b985d68245954af1ff023db121b0635 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 12 Aug 2023 09:42:58 +0200 Subject: Add stdckdint.h header for C23 This patch adds header, which defines ckd_{add,sub,mul} using __builtin_{add,sub,mul}_overflow. As requested, it doesn't pedantically diagnose things which work just fine, e.g. inputs with plain char, bool, bit-precise integer or enumerated types and result pointer to plain char or bit-precise integer. The header will #include_next so that C library can supply its part if the header implementation in the future needs to be split between parts under the control of the compiler and parts under the control of C library. 2023-08-12 Jakub Jelinek * Makefile.in (USER_H): Add stdckdint.h. * ginclude/stdckdint.h: New file. * gcc.dg/stdckdint-1.c: New test. * gcc.dg/stdckdint-2.c: New test. --- gcc/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/Makefile.in') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 2429128..a171914 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -469,6 +469,7 @@ USER_H = $(srcdir)/ginclude/float.h \ $(srcdir)/ginclude/stdnoreturn.h \ $(srcdir)/ginclude/stdalign.h \ $(srcdir)/ginclude/stdatomic.h \ + $(srcdir)/ginclude/stdckdint.h \ $(EXTRA_HEADERS) USER_H_INC_NEXT_PRE = @user_headers_inc_next_pre@ -- cgit v1.1