Skip to content

Commit

Permalink
edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Dec 1, 2024
1 parent 5c5df77 commit 015f2a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions src/file.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
int main()
/*
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3214.pdf
*/

int main(void)
{
do
{
int i;
defer i = 1;
if (i) break;
defer i = 3;
}
while(0);
const int * const p;
static_assert(_Generic(p, const int * : 1 ));
static_assert(_Generic(typeof(p), const int * const: 1));

static_assert(_Generic(int, int : 1));
static_assert(_Generic(typeof("abc"), char [4]: 1));
}

4 changes: 2 additions & 2 deletions src/web/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@

<select id="outtype" style="margin-left:auto;margin-right: 10px; ">
<option value="-2">C89</option>
<!--

<option value="-1">C89 (ANSI C)</option>
<option value="1">C99</option>
<option value="2">C11</option>
<option value="3">C23</option>
<option value="4">C2Y</option>
<option value="100">C2Y++</option>
-->

<option value="0">Preprocess only</option>
<!--<option value="-2">C89 -direct-compilation</option>-->
</select>
Expand Down
2 changes: 1 addition & 1 deletion vc/cprimev3.vcxproj.user
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>file.c -target=ir</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>file.c </LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>$(ProjectDir)../src/</LocalDebuggerWorkingDirectory>
</PropertyGroup>
Expand Down

0 comments on commit 015f2a7

Please sign in to comment.