mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
"Public by default"
This commit is contained in:
committed by
Christoffer Lerno
parent
13e95553bb
commit
97ac957cb7
@@ -2,11 +2,11 @@
|
||||
|
||||
module const_pointer;
|
||||
|
||||
double foo = 17;
|
||||
double bar = 12.0;
|
||||
float xx = 12.0;
|
||||
static double foo = 17;
|
||||
static double bar = 12.0;
|
||||
static float xx = 12.0;
|
||||
|
||||
void*[3] data = { &foo, &bar, &xx };
|
||||
static void*[3] data = { &foo, &bar, &xx };
|
||||
|
||||
// #expect: const_pointer.ll
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module pointer_index;
|
||||
|
||||
public func void test1(int* x)
|
||||
func void test1(int* x)
|
||||
{
|
||||
int a = x[0];
|
||||
int b = *x;
|
||||
@@ -8,14 +8,14 @@ public func void test1(int* x)
|
||||
int d = x[-1];
|
||||
}
|
||||
|
||||
public func void test2(char* x)
|
||||
func void test2(char* x)
|
||||
{
|
||||
char a = x[0];
|
||||
char b = *x;
|
||||
char c = x[1];
|
||||
}
|
||||
|
||||
public func void test3(long* x)
|
||||
func void test3(long* x)
|
||||
{
|
||||
long a = x[0];
|
||||
long b = *x;
|
||||
|
||||
Reference in New Issue
Block a user