aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorAlexander Egorenkov <eaibmz@gmail.com>2025-05-26 14:06:56 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-06-10 11:11:43 +0000
commit5d7e17caf7d0971d22446d8a81bcf1cd8c18a0dc (patch)
treea5b3765b1130186ae65614810766f6a34a81fe60 /pkg/csource
parent8937fbd020205c74164f5912c8e36a5f6404a657 (diff)
pkg/csource: remove C23 embed built-in defines
The new C23 embed built-in defines cause build errors in executor with GCC 15. <stdin>:3:9: error: ‘__STDC_EMBED_NOT_FOUND__’ redefined [-Werror] <built-in>: note: this is the location of the previous definition <stdin>:4:9: error: ‘__STDC_EMBED_FOUND__’ redefined [-Werror] <built-in>: note: this is the location of the previous definition <stdin>:5:9: error: ‘__STDC_EMBED_EMPTY__’ redefined [-Werror] <built-in>: note: this is the location of the previous definition Signed-off-by: Alexander Egorenkov <eaibmz@gmail.com>
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/common.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go
index e341c1df0..a065a6bdb 100644
--- a/pkg/csource/common.go
+++ b/pkg/csource/common.go
@@ -132,10 +132,13 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool {
func removeSystemDefines(src []byte, defines []string) ([]byte, error) {
remove := map[string]string{
- "__STDC__": "1",
- "__STDC_HOSTED__": "1",
- "__STDC_UTF_16__": "1",
- "__STDC_UTF_32__": "1",
+ "__STDC__": "1",
+ "__STDC_HOSTED__": "1",
+ "__STDC_UTF_16__": "1",
+ "__STDC_UTF_32__": "1",
+ "__STDC_EMBED_NOT_FOUND__": "0",
+ "__STDC_EMBED_FOUND__": "1",
+ "__STDC_EMBED_EMPTY__": "2",
}
for _, def := range defines {
eq := strings.IndexByte(def, '=')