mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix issue with default macro arguments. Test of ?? instead of else. Added libc
This commit is contained in:
committed by
Christoffer Lerno
parent
e4c7dde30b
commit
fb9be722bc
@@ -170,7 +170,7 @@ class Issues:
|
||||
lines = len(self.sourcefile.content)
|
||||
while self.line < lines:
|
||||
line = self.sourcefile.content[self.line].strip()
|
||||
if line.startswith("// #"):
|
||||
if line.startswith("// #") or line.startswith("/* #"):
|
||||
self.parse_header_directive(line)
|
||||
self.line += 1
|
||||
continue
|
||||
|
||||
@@ -4,13 +4,14 @@ extern func int! testError();
|
||||
|
||||
func void test()
|
||||
{
|
||||
double x = (testError() + testError()) else 100;
|
||||
double y = (1 << testError()) else 100;
|
||||
double z = testError() >> 1 else 100;
|
||||
double w = testError() * testError() else 100;
|
||||
|
||||
double x = (testError() + testError()) ?? 100;
|
||||
double y = (1 << testError()) ?? 100;
|
||||
double z = testError() >> 1 ?? 100;
|
||||
double w = testError() * testError() ?? 100;
|
||||
}
|
||||
|
||||
// #expect: else_checks.ll
|
||||
/* #expect: else_checks.ll
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare i64 @testError(i32*) #0
|
||||
|
||||
Reference in New Issue
Block a user