Skip to content

Commit 28f7b90

Browse files
author
thk123
committed
Added a regression to demonstrate const structs
Const structs are not storing their const-ness inside the symbol table. This regression test exhibits this behaviour. Marked as KNOWNBUG (is issue #355)
1 parent 5ec88cd commit 28f7b90

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
struct struct_tag_name
3+
{
4+
int x;
5+
float y;
6+
};
7+
8+
int main()
9+
{
10+
const struct struct_tag_name my_struct_var = {.x = 1, .y = 3.15};
11+
const double z = 4;
12+
return 0;
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
KNWONBUG
2+
main.c
3+
"--show-symbol-table"
4+
^Type\.*: struct struct_tag_name$
5+
^Type\.*: const double$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)