Skip to content

Commit 919afcb

Browse files
committed
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>
1 parent 874a138 commit 919afcb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pkg/csource/common.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,13 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool {
132132

133133
func removeSystemDefines(src []byte, defines []string) ([]byte, error) {
134134
remove := map[string]string{
135-
"__STDC__": "1",
136-
"__STDC_HOSTED__": "1",
137-
"__STDC_UTF_16__": "1",
138-
"__STDC_UTF_32__": "1",
135+
"__STDC__": "1",
136+
"__STDC_HOSTED__": "1",
137+
"__STDC_UTF_16__": "1",
138+
"__STDC_UTF_32__": "1",
139+
"__STDC_EMBED_NOT_FOUND__": "0",
140+
"__STDC_EMBED_FOUND__": "1",
141+
"__STDC_EMBED_EMPTY__": "2",
139142
}
140143
for _, def := range defines {
141144
eq := strings.IndexByte(def, '=')

0 commit comments

Comments
 (0)