union member already defined?
[Thread Prev] | [Thread Next]
- Subject: union member already defined?
- From: theos <theosjp@xxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sat, 28 Jul 2018 18:21:33 +0900
- To: myrddin-dev <myrddin-dev@xxxxxxxxxxxxxx>
hi, i started to learn myrddin recently and was going through the tutorial.i am getting - somewhat unexpected - an "already defined" error for the below union example. this is with the latest version on linux.
is this supposed to be this way? and if so what am i doing wrong?
% mbld -R u2.myr
u2.myr:2: `a already defined on u2.myr:7
FAIL: 6m u2.myr
% 6m u2.myr
u2.myr:2: `a already defined on u2.myr:7
% cat u2.myr
type u1 = union
`a int
`b flt
;;
type u2 = union
`a flt
`b char
;;
const main = {
}
its error-ing out in stab.c - i've poked a bit around in putucon and
gram.y, but had to confess to myself that i dont really know what i am
looking for/at.
Breakpoint 3, putucon (st=0x5555557d1070, uc=0x5555557dc460) at stab.c:495 495 lfatal(old->loc, "`%s already defined on %s:%d", (gdb) bt #0 putucon (st=0x5555557d1070, uc=0x5555557dc460) at stab.c:495#1 0x0000555555578d30 in installucons (st=0x5555557d1070, t=0x5555557dc6a0) at gram.y:1252
#2 0x0000555555574484 in yyparse () at gram.y:248 #3 0x0000555555563e3b in main (argc=2, argv=0x7fffffffe728) at main.c:276 thank you, theo.
| Re: union member already defined? | iriri <iri@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
- Prev by Date: Re: [PATCH] Update documentation for libthread.
- Next by Date: Re: union member already defined?
- Previous by thread: Re: [PATCH] Update documentation for libthread.
- Next by thread: Re: union member already defined?
- Index(es):