Skip to content

Commit

Permalink
Test AllowUndefinedSymbols in the clib sample.
Browse files Browse the repository at this point in the history
Part of #80.
  • Loading branch information
alexrp committed Jan 4, 2024
1 parent d26e30d commit fdd2a5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/samples/clib/clib.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ typedef struct

int x;

void undefined();

__attribute__((visibility("default")))
int clib(void)
{
// Exercise AllowUndefinedSymbols.
undefined();

// Triggers -Wparentheses.
if (x = 42)
return x;
Expand Down
1 change: 1 addition & 0 deletions src/samples/clib/clib.cproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Vezel.Zig.Sdk">
<PropertyGroup>
<AllowUndefinedSymbols>true</AllowUndefinedSymbols>
<DisableWarnings>
$(DisableWarnings);
parentheses
Expand Down

0 comments on commit fdd2a5f

Please sign in to comment.