#C11 in build.zig

1 messages · Page 1 of 1 (latest)

fast sinew
#

How do I set the C standard to C11 in build.zig? I have located the enum but do not know the function to call to set it. The default is CStd.C99, I need CStd.C11.

fast sinew
#

Found an answer in the embedded channel on this group. Use flags in exe.addCSourceFiles(). Not as elegant as I would like, but it appears to work.

scarlet locust
#

maybe obj.c_std = .C11; ?

fast sinew
#

exe.c_std = .C11 does not appear to work with Zig 0.9.1 on Windows. exe.setVerboseCC(true); shows no effect for .C89, .C99 or .C11. It would have been a neater solution.