zig/test/standalone/issue_12471/main.zig
Evan Haas bcaa9df5b4 translate-c: Don't add self-defined macros to global name table
A self-defined macro is one of the form `#define FOO FOO`

Those types of macros have never been translated; this change will cause
any macros which refer to them to be translated as `@compileError` instead
of referring to a non-existent identifier.

Closes #12471
2022-08-26 11:24:57 +03:00

13 lines
185 B
Zig

const c = @cImport({
@cDefine("FOO", "FOO");
@cDefine("BAR", "FOO");
@cDefine("BAZ", "QUX");
@cDefine("QUX", "QUX");
});
pub fn main() u8 {
_ = c;
return 0;
}