mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Fixes missing checks to body arguments. Do not create debug declaration for value-only parameter. Bug in alignment for atomics. Macro ref parameters are pointers.
This commit is contained in:
committed by
Christoffer Lerno
parent
90d91b4891
commit
34306cbf5d
@@ -2,13 +2,13 @@ module test;
|
||||
import libc;
|
||||
|
||||
/**
|
||||
* @checked a = b, b = a
|
||||
* @checked *a = *b, *b = *a
|
||||
*/
|
||||
macro void @swap(&a, &b)
|
||||
{
|
||||
$typeof(a) temp = a;
|
||||
a = b;
|
||||
b = temp;
|
||||
var temp = *a;
|
||||
*a = *b;
|
||||
*b = temp;
|
||||
}
|
||||
|
||||
fn void main()
|
||||
|
||||
Reference in New Issue
Block a user